mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-14 03:50:39 +00:00
fix: incorrect prefilter check (#7886)
Signed-off-by: evenyag <realevenyag@gmail.com>
This commit is contained in:
@@ -282,10 +282,10 @@ impl FlatReadFormat {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if raw batches from parquet use the flat layout with a
|
||||
/// dictionary-encoded `__primary_key` column (i.e., [`ParquetAdapter::Flat`]).
|
||||
/// Returns `true` if raw batches from parquet use the flat layout and
|
||||
/// stores primary key columns as raw columns.
|
||||
/// Returns `false` for the legacy primary-key-to-flat conversion path.
|
||||
pub(crate) fn raw_batch_has_primary_key_dictionary(&self) -> bool {
|
||||
pub(crate) fn batch_has_raw_pk_columns(&self) -> bool {
|
||||
matches!(&self.parquet_adapter, ParquetAdapter::Flat(_))
|
||||
}
|
||||
|
||||
|
||||
@@ -217,9 +217,9 @@ impl PrefilterContextBuilder {
|
||||
return None;
|
||||
}
|
||||
|
||||
// Only flat format with dictionary-encoded PKs supports PK prefiltering.
|
||||
// Only perform PK prefiltering for primary-key-to-flat conversion path.
|
||||
let flat_format = read_format.as_flat()?;
|
||||
if !flat_format.raw_batch_has_primary_key_dictionary() {
|
||||
if flat_format.batch_has_raw_pk_columns() {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user