Skip to content

Commit 0c8443d

Browse files
committed
fix: use bitmap options to control bitmap stategy
1 parent 1e13c67 commit 0c8443d

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/paimon/format/parquet/parquet_file_batch_reader.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ Status ParquetFileBatchReader::SetReadSchema(
176176
FilterRowGroupsByBitmap(selection_bitmap.value(), target_row_groups));
177177
// workaround: page index filter does not support nested fields for now, skip page index
178178
// bitmap pushdown if there is any nested field in the schema
179-
if (!has_nested_field && enable_page_index_filter) {
180-
// To decide which strategy to use, "trim" or "coalesce". "Coalesce" By default.
179+
if (!has_nested_field) {
180+
// To decide which strategy to use, "trim" or "coalesce". "coalesce" By default.
181181
PAIMON_ASSIGN_OR_RAISE(
182182
std::string strategy,
183183
OptionsUtils::GetValueFromMap<std::string>(
@@ -192,10 +192,12 @@ Status ParquetFileBatchReader::SetReadSchema(
192192
PAIMON_ASSIGN_OR_RAISE(
193193
target_row_groups,
194194
RefineRowRangesByCoalescing(selection_bitmap.value(), target_row_groups));
195+
} else if (strategy == "none") {
196+
// No refinement
195197
} else {
196198
return Status::Invalid(
197199
fmt::format("Invalid row range refining strategy :{}, valid strategies "
198-
"are: trim, coalesce",
200+
"are: trim, coalesce and none",
199201
strategy));
200202
}
201203
}

src/paimon/format/parquet/parquet_format_defs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ static inline const char PARQUET_READ_CACHE_OPTION_RANGE_SIZE_LIMIT[] =
7474
// rows (and skip pages with no selected rows). Requires page index. Its advantage
7575
// is stable, page-bounded ranges. After collected trimmed ranges for each column,
7676
// the intersection of all columns' ranges is taken to produce the final row ranges.
77+
// * "none": no refinement.
7778
static inline const char PARQUET_READ_BITMAP_ROW_RANGE_REFINING_STRATEGY[] =
7879
"parquet.read.bitmap.row-range-refining-strategy";
7980
// When strategy = "coalesce", adjacent bitmap row ranges whose gap (in rows) is

0 commit comments

Comments
 (0)