Skip to content

Commit

Permalink
9/n remove deprecated ColumnChunk.file_offset
Browse files Browse the repository at this point in the history
  • Loading branch information
alkis committed Sep 2, 2024
1 parent e5eff65 commit f273033
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
14 changes: 1 addition & 13 deletions cpp/src/generated/parquet3_generated.h

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

15 changes: 11 additions & 4 deletions cpp/src/parquet/metadata3_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion cpp/src/parquet/parquet3.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f273033

Please sign in to comment.