diff --git a/be/src/formats/parquet/stored_column_reader.cpp b/be/src/formats/parquet/stored_column_reader.cpp index 344a38690ef40..02d9da714d678 100644 --- a/be/src/formats/parquet/stored_column_reader.cpp +++ b/be/src/formats/parquet/stored_column_reader.cpp @@ -115,12 +115,6 @@ class OptionalStoredColumnReader : public StoredColumnReaderImpl { _reader->def_level_decoder().get_levels(def_levels, num_levels); } - void append_default_levels(size_t row_nums) override { - if (_need_parse_levels) { - _reader->def_level_decoder().append_default_levels(row_nums); - } - } - private: Status _decode_levels(size_t* num_rows, size_t* num_levels_parsed, level_t** def_levels); @@ -129,6 +123,12 @@ class OptionalStoredColumnReader : public StoredColumnReaderImpl { Status _read_values_on_levels(size_t num_values, starrocks::parquet::ColumnContentType content_type, starrocks::Column* dst, bool append_default) override; + void _append_default_levels(size_t row_nums) override { + if (_need_parse_levels) { + _reader->def_level_decoder().append_default_levels(row_nums); + } + } + const ParquetField* _field = nullptr; // When the flag is false, the information of levels does not need to be materialized, @@ -415,7 +415,7 @@ Status OptionalStoredColumnReader::_read_values_on_levels(size_t num_values, starrocks::parquet::ColumnContentType content_type, starrocks::Column* dst, bool append_default) { if (append_default) { - append_default_levels(num_values); + _append_default_levels(num_values); dst->append_default(num_values); return Status::OK(); } else { diff --git a/be/src/formats/parquet/stored_column_reader.h b/be/src/formats/parquet/stored_column_reader.h index c5765870e4175..a8ca20e1693c1 100644 --- a/be/src/formats/parquet/stored_column_reader.h +++ b/be/src/formats/parquet/stored_column_reader.h @@ -103,12 +103,10 @@ class StoredColumnReaderImpl : public StoredColumnReader { virtual Status _next_page(); virtual bool _cur_page_selected(size_t row_readed, const Filter* filter, size_t to_read); - void update_read_context(size_t records_read); - // for RequiredColumn, there is no need to get levels. // for RepeatedColumn, there is no possible to get default levels. // for OptionalColumn, we will override it. - virtual void append_default_levels(size_t row_nums) {} + virtual void _append_default_levels(size_t row_nums) {} std::unique_ptr _reader; size_t _num_values_left_in_cur_page = 0;