Skip to content

Commit

Permalink
[Refactor] remove unused func declearation (StarRocks#42986)
Browse files Browse the repository at this point in the history
Signed-off-by: zombee0 <[email protected]>
  • Loading branch information
zombee0 authored Mar 22, 2024
1 parent 8bcffcf commit 9cfa3b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 7 additions & 7 deletions be/src/formats/parquet/stored_column_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions be/src/formats/parquet/stored_column_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<ColumnChunkReader> _reader;
size_t _num_values_left_in_cur_page = 0;
Expand Down

0 comments on commit 9cfa3b7

Please sign in to comment.