Skip to content

Commit

Permalink
Remove variant thrift members and regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
neilechao committed Feb 20, 2025
1 parent 8b48c5d commit 89e90c8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 81 deletions.
44 changes: 12 additions & 32 deletions cpp/src/generated/parquet_types.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 5 additions & 11 deletions cpp/src/generated/parquet_types.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 1 addition & 36 deletions cpp/src/generated/parquet_types.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -1201,46 +1201,19 @@ uint32_t VariantType::read(Protocol_* iprot) {

using ::apache::thrift::protocol::TProtocolException;

bool isset_metadata = false;
bool isset_value = false;

while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readBinary(this->metadata);
isset_metadata = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readBinary(this->value);
isset_value = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->skip(ftype);
xfer += iprot->readFieldEnd();
}

xfer += iprot->readStructEnd();

if (!isset_metadata)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_value)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}

Expand All @@ -1250,14 +1223,6 @@ uint32_t VariantType::write(Protocol_* oprot) const {
::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
xfer += oprot->writeStructBegin("VariantType");

xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeBinary(this->metadata);
xfer += oprot->writeFieldEnd();

xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeBinary(this->value);
xfer += oprot->writeFieldEnd();

xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
Expand Down
2 changes: 0 additions & 2 deletions cpp/src/parquet/parquet.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,6 @@ struct BsonType {
* Allowed for physical types: BINARY
*/
struct VariantType {
1: required binary metadata
2: required binary value
}

/**
Expand Down

0 comments on commit 89e90c8

Please sign in to comment.