diff --git a/cpp/src/generated/parquet3_generated.h b/cpp/src/generated/parquet3_generated.h index 21a381556198c..c779911834e1d 100644 --- a/cpp/src/generated/parquet3_generated.h +++ b/cpp/src/generated/parquet3_generated.h @@ -1320,15 +1320,11 @@ struct ColumnChunk FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { typedef ColumnChunkBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_FILE_PATH = 4, - VT_FILE_OFFSET = 6, - VT_META_DATA = 8 + VT_META_DATA = 6 }; const ::flatbuffers::String *file_path() const { return GetPointer(VT_FILE_PATH); } - int32_t file_offset() const { - return GetField(VT_FILE_OFFSET, 0); - } const parquet::format3::ColumnMetadata *meta_data() const { return GetPointer(VT_META_DATA); } @@ -1336,7 +1332,6 @@ struct ColumnChunk FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table { return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_FILE_PATH) && verifier.VerifyString(file_path()) && - VerifyField(verifier, VT_FILE_OFFSET, 4) && VerifyOffset(verifier, VT_META_DATA) && verifier.VerifyTable(meta_data()) && verifier.EndTable(); @@ -1350,9 +1345,6 @@ struct ColumnChunkBuilder { void add_file_path(::flatbuffers::Offset<::flatbuffers::String> file_path) { fbb_.AddOffset(ColumnChunk::VT_FILE_PATH, file_path); } - void add_file_offset(int32_t file_offset) { - fbb_.AddElement(ColumnChunk::VT_FILE_OFFSET, file_offset, 0); - } void add_meta_data(::flatbuffers::Offset meta_data) { fbb_.AddOffset(ColumnChunk::VT_META_DATA, meta_data); } @@ -1370,11 +1362,9 @@ struct ColumnChunkBuilder { inline ::flatbuffers::Offset CreateColumnChunk( ::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::String> file_path = 0, - int32_t file_offset = 0, ::flatbuffers::Offset meta_data = 0) { ColumnChunkBuilder builder_(_fbb); builder_.add_meta_data(meta_data); - builder_.add_file_offset(file_offset); builder_.add_file_path(file_path); return builder_.Finish(); } @@ -1382,13 +1372,11 @@ inline ::flatbuffers::Offset CreateColumnChunk( inline ::flatbuffers::Offset CreateColumnChunkDirect( ::flatbuffers::FlatBufferBuilder &_fbb, const char *file_path = nullptr, - int32_t file_offset = 0, ::flatbuffers::Offset meta_data = 0) { auto file_path__ = file_path ? _fbb.CreateString(file_path) : 0; return parquet::format3::CreateColumnChunk( _fbb, file_path__, - file_offset, meta_data); } diff --git a/cpp/src/parquet/metadata3_benchmark.cc b/cpp/src/parquet/metadata3_benchmark.cc index e274a24943f28..2544792d693e9 100644 --- a/cpp/src/parquet/metadata3_benchmark.cc +++ b/cpp/src/parquet/metadata3_benchmark.cc @@ -116,6 +116,17 @@ // 5/large-footer2: num-rgs=4 num-cols=2930 thrift=2248476 flatbuf=1165112 // // +// Remove deprecated ColumnChunk.file_offset +// +// +// 0/amazon_apparel.footer: num-rgs=1182 num-cols=16 thrift=2158995 flatbuf=1292376 +// 1/amazon_movie_tv.footer: num-rgs=3 num-cols=18 thrift=22578 flatbuf=5056 +// 2/amazon_polarity.footer: num-rgs=900 num-cols=4 thrift=1074313 flatbuf=214192 +// 3/amazon_reviews_books.footer: num-rgs=159 num-cols=44 thrift=767840 flatbuf=226112 +// 4/large-footer1: num-rgs=23 num-cols=2001 thrift=3253741 flatbuf=2961808 +// 5/large-footer2: num-rgs=4 num-cols=2930 thrift=2248476 flatbuf=1120360 +// +// #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-function" @@ -375,11 +386,7 @@ class Converter { auto operator()(format::ColumnChunk& cc, int rg_idx, int col_idx) { auto meta_data = (*this)(cc.meta_data, rg_idx, col_idx); - // All offsets are relative to the row group. - auto off = md_->row_groups[rg_idx].file_offset; - format3::ColumnChunkBuilder b(builder_); - b.add_file_offset(cc.file_offset - off); b.add_meta_data(meta_data); cc.__isset.crypto_metadata = false; // TODO if (cc.__isset.encrypted_column_metadata) { diff --git a/cpp/src/parquet/parquet3.fbs b/cpp/src/parquet/parquet3.fbs index 1c1d8864bfef0..20a2714239e8d 100644 --- a/cpp/src/parquet/parquet3.fbs +++ b/cpp/src/parquet/parquet3.fbs @@ -174,7 +174,6 @@ table ColumnMetadata { table ColumnChunk { file_path: string; - file_offset: int; meta_data: ColumnMetadata; // crypto_metadata: ColumnCryptoMetadata; // TODO // encrypted_column_metadata: [byte]; // TODO