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->cols = array(); $_size80 = 0; $_etype83 = 0; $xfer += $input->readListBegin($_etype83, $_size80); for ($_i84 = 0; $_i84 < $_size80; ++$_i84) { $elem85 = null; $elem85 = new \metastore\FieldSchema(); $xfer += $elem85->read($input); $this->cols[] = $elem85; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { $xfer += $input->readString($this->location); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRING) { $xfer += $input->readString($this->inputFormat); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::STRING) { $xfer += $input->readString($this->outputFormat); } else { $xfer += $input->skip($ftype); } break; case 5: if ($ftype == TType::BOOL) { $xfer += $input->readBool($this->compressed); } else { $xfer += $input->skip($ftype); } break; case 6: if ($ftype == TType::I32) { $xfer += $input->readI32($this->numBuckets); } else { $xfer += $input->skip($ftype); } break; case 7: if ($ftype == TType::STRUCT) { $this->serdeInfo = new \metastore\SerDeInfo(); $xfer += $this->serdeInfo->read($input); } else { $xfer += $input->skip($ftype); } break; case 8: if ($ftype == TType::LST) { $this->bucketCols = array(); $_size86 = 0; $_etype89 = 0; $xfer += $input->readListBegin($_etype89, $_size86); for ($_i90 = 0; $_i90 < $_size86; ++$_i90) { $elem91 = null; $xfer += $input->readString($elem91); $this->bucketCols[] = $elem91; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 9: if ($ftype == TType::LST) { $this->sortCols = array(); $_size92 = 0; $_etype95 = 0; $xfer += $input->readListBegin($_etype95, $_size92); for ($_i96 = 0; $_i96 < $_size92; ++$_i96) { $elem97 = null; $elem97 = new \metastore\Order(); $xfer += $elem97->read($input); $this->sortCols[] = $elem97; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 10: if ($ftype == TType::MAP) { $this->parameters = array(); $_size98 = 0; $_ktype99 = 0; $_vtype100 = 0; $xfer += $input->readMapBegin($_ktype99, $_vtype100, $_size98); for ($_i102 = 0; $_i102 < $_size98; ++$_i102) { $key103 = ''; $val104 = ''; $xfer += $input->readString($key103); $xfer += $input->readString($val104); $this->parameters[$key103] = $val104; } $xfer += $input->readMapEnd(); } 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->cols = array(); $_size124 = 0; $_etype127 = 0; $xfer += $input->readListBegin($_etype127, $_size124); for ($_i128 = 0; $_i128 < $_size124; ++$_i128) { $elem129 = null; $elem129 = new \metastore\FieldSchema(); $xfer += $elem129->read($input); $this->cols[] = $elem129; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { $xfer += $input->readString($this->location); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRING) { $xfer += $input->readString($this->inputFormat); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::STRING) { $xfer += $input->readString($this->outputFormat); } else { $xfer += $input->skip($ftype); } break; case 5: if ($ftype == TType::BOOL) { $xfer += $input->readBool($this->compressed); } else { $xfer += $input->skip($ftype); } break; case 6: if ($ftype == TType::I32) { $xfer += $input->readI32($this->numBuckets); } else { $xfer += $input->skip($ftype); } break; case 7: if ($ftype == TType::STRUCT) { $this->serdeInfo = new \metastore\SerDeInfo(); $xfer += $this->serdeInfo->read($input); } else { $xfer += $input->skip($ftype); } break; case 8: if ($ftype == TType::LST) { $this->bucketCols = array(); $_size130 = 0; $_etype133 = 0; $xfer += $input->readListBegin($_etype133, $_size130); for ($_i134 = 0; $_i134 < $_size130; ++$_i134) { $elem135 = null; $xfer += $input->readString($elem135); $this->bucketCols[] = $elem135; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 9: if ($ftype == TType::LST) { $this->sortCols = array(); $_size136 = 0; $_etype139 = 0; $xfer += $input->readListBegin($_etype139, $_size136); for ($_i140 = 0; $_i140 < $_size136; ++$_i140) { $elem141 = null; $elem141 = new \metastore\Order(); $xfer += $elem141->read($input); $this->sortCols[] = $elem141; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 10: if ($ftype == TType::MAP) { $this->parameters = array(); $_size142 = 0; $_ktype143 = 0; $_vtype144 = 0; $xfer += $input->readMapBegin($_ktype143, $_vtype144, $_size142); for ($_i146 = 0; $_i146 < $_size142; ++$_i146) { $key147 = ''; $val148 = ''; $xfer += $input->readString($key147); $xfer += $input->readString($val148); $this->parameters[$key147] = $val148; } $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 11: if ($ftype == TType::STRUCT) { $this->skewedInfo = new \metastore\SkewedInfo(); $xfer += $this->skewedInfo->read($input); } else { $xfer += $input->skip($ftype); } break; case 12: if ($ftype == TType::BOOL) { $xfer += $input->readBool($this->storedAsSubDirectories); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }