Skip to content

Commit 4fb7616

Browse files
committed
Do not parse offset/column index if not needed
1 parent 6333f8b commit 4fb7616

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

parquet/src/file/metadata/thrift_gen.rs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ struct ColumnChunk<'a> {
153153
1: optional string<'a> file_path
154154
2: required i64 file_offset = 0
155155
3: optional ColumnMetaData<'a> meta_data
156-
4: optional i64 offset_index_offset
157-
5: optional i32 offset_index_length
158-
6: optional i64 column_index_offset
159-
7: optional i32 column_index_length
156+
//4: optional i64 offset_index_offset
157+
//5: optional i32 offset_index_length
158+
//6: optional i64 column_index_offset
159+
//7: optional i32 column_index_length
160160
8: optional ColumnCryptoMetaData crypto_metadata
161-
9: optional binary<'a> encrypted_column_metadata
161+
//9: optional binary<'a> encrypted_column_metadata
162162
}
163163
);
164164
#[cfg(not(feature = "encryption"))]
@@ -167,10 +167,10 @@ struct ColumnChunk {
167167
1: optional string file_path
168168
2: required i64 file_offset = 0
169169
3: optional ColumnMetaData meta_data
170-
4: optional i64 offset_index_offset
171-
5: optional i32 offset_index_length
172-
6: optional i64 column_index_offset
173-
7: optional i32 column_index_length
170+
//4: optional i64 offset_index_offset
171+
//5: optional i32 offset_index_length
172+
//6: optional i64 column_index_offset
173+
//7: optional i32 column_index_length
174174
}
175175
);
176176

@@ -325,10 +325,14 @@ fn convert_column(
325325
let encoding_stats = col_metadata.encoding_stats;
326326
let bloom_filter_offset = col_metadata.bloom_filter_offset;
327327
let bloom_filter_length = col_metadata.bloom_filter_length;
328-
let offset_index_offset = column.offset_index_offset;
329-
let offset_index_length = column.offset_index_length;
330-
let column_index_offset = column.column_index_offset;
331-
let column_index_length = column.column_index_length;
328+
//let offset_index_offset = column.offset_index_offset;
329+
//let offset_index_length = column.offset_index_length;
330+
//let column_index_offset = column.column_index_offset;
331+
//let column_index_length = column.column_index_length;
332+
let offset_index_offset = None;
333+
let offset_index_length = None;
334+
let column_index_offset = None;
335+
let column_index_length = None;
332336
let unencoded_byte_array_data_bytes = None;
333337
// let (unencoded_byte_array_data_bytes, repetition_level_histogram, definition_level_histogram) =
334338
// if let Some(size_stats) = col_metadata.size_statistics {

0 commit comments

Comments
 (0)