public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 0:
                 if ($ftype == TType::LST) {
                     $this->success = array();
                     $_size257 = 0;
                     $_etype260 = 0;
                     $xfer += $input->readListBegin($_etype260, $_size257);
                     for ($_i261 = 0; $_i261 < $_size257; ++$_i261) {
                         $elem262 = null;
                         $elem262 = new \Apache\Hadoop\Hive\FieldSchema();
                         $xfer += $elem262->read($input);
                         $this->success[] = $elem262;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->o1 = new \Apache\Hadoop\Hive\MetaException();
                     $xfer += $this->o1->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRUCT) {
                     $this->o2 = new \Apache\Hadoop\Hive\UnknownTableException();
                     $xfer += $this->o2->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::STRUCT) {
                     $this->o3 = new \Apache\Hadoop\Hive\UnknownDBException();
                     $xfer += $this->o3->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::LST) {
                     $this->fieldSchemas = array();
                     $_size202 = 0;
                     $_etype205 = 0;
                     $xfer += $input->readListBegin($_etype205, $_size202);
                     for ($_i206 = 0; $_i206 < $_size202; ++$_i206) {
                         $elem207 = null;
                         $elem207 = new \Apache\Hadoop\Hive\FieldSchema();
                         $xfer += $elem207->read($input);
                         $this->fieldSchemas[] = $elem207;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::MAP) {
                     $this->properties = array();
                     $_size208 = 0;
                     $_ktype209 = 0;
                     $_vtype210 = 0;
                     $xfer += $input->readMapBegin($_ktype209, $_vtype210, $_size208);
                     for ($_i212 = 0; $_i212 < $_size208; ++$_i212) {
                         $key213 = '';
                         $val214 = '';
                         $xfer += $input->readString($key213);
                         $xfer += $input->readString($val214);
                         $this->properties[$key213] = $val214;
                     }
                     $xfer += $input->readMapEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }