From d9441ea5a321bb67eb93e6ae151f9b1a188da2d2 Mon Sep 17 00:00:00 2001 From: Paul Mattione Date: Wed, 29 May 2024 15:58:07 -0400 Subject: [PATCH] Write parquet column chunk file_offset --- cpp/src/io/parquet/writer_impl.cu | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cpp/src/io/parquet/writer_impl.cu b/cpp/src/io/parquet/writer_impl.cu index 1dfced94f5b..5786df6169e 100644 --- a/cpp/src/io/parquet/writer_impl.cu +++ b/cpp/src/io/parquet/writer_impl.cu @@ -2486,8 +2486,11 @@ void writer::impl::write_parquet_data_to_sink( _out_sink[p]->host_write(bounce_buffer.data(), ck.compressed_size); } - auto const chunk_offset = _current_chunk_offset[p]; - auto& column_chunk_meta = row_group.columns[i].meta_data; + auto const chunk_offset = _current_chunk_offset[p]; + auto& column_chunk = row_group.columns[i]; + column_chunk.file_offset = chunk_offset; + + auto& column_chunk_meta = column_chunk.meta_data; column_chunk_meta.data_page_offset = chunk_offset + ((ck.use_dictionary) ? ck.dictionary_size : 0); column_chunk_meta.dictionary_page_offset = (ck.use_dictionary) ? chunk_offset : 0;