morningman commented on code in PR #15001: URL: https://github.com/apache/doris/pull/15001#discussion_r1046663418
########## be/src/vec/exec/format/parquet/vparquet_reader.cpp: ########## @@ -545,14 +545,18 @@ Status ParquetReader::_process_page_index(const tparquet::RowGroup& row_group) { if (!_has_page_index(row_group.columns, page_index)) { return Status::OK(); } - int64_t buffer_size = page_index._column_index_size + page_index._offset_index_size; - uint8_t buff[buffer_size]; + // int64_t buffer_size = page_index._column_index_size; Review Comment: Remove unused code ########## be/src/vec/exec/format/parquet/vparquet_reader.cpp: ########## @@ -545,14 +545,18 @@ Status ParquetReader::_process_page_index(const tparquet::RowGroup& row_group) { if (!_has_page_index(row_group.columns, page_index)) { return Status::OK(); } - int64_t buffer_size = page_index._column_index_size + page_index._offset_index_size; - uint8_t buff[buffer_size]; + // int64_t buffer_size = page_index._column_index_size; + uint8_t col_index_buff[page_index._column_index_size]; int64_t bytes_read = 0; - RETURN_IF_ERROR( - _file_reader->readat(page_index._column_index_start, buffer_size, &bytes_read, buff)); - + RETURN_IF_ERROR(_file_reader->readat(page_index._column_index_start, Review Comment: I think we can merge this 2 `readat()`, and split the buffer into 2 buffers, so that we can save one remote file read call. ########## be/src/vec/exec/format/parquet/vparquet_page_index.h: ########## @@ -38,7 +38,7 @@ class PageIndex { Status parse_column_index(const tparquet::ColumnChunk& chunk, const uint8_t* buff, tparquet::ColumnIndex* _column_index); Status parse_offset_index(const tparquet::ColumnChunk& chunk, const uint8_t* buff, - int64_t buffer_size, tparquet::OffsetIndex* _offset_index); + tparquet::OffsetIndex* _offset_index); Review Comment: ```suggestion tparquet::OffsetIndex* offset_index); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org