mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-14 01:02:55 +00:00
feat: try get pk values from cache when applying predicate to parquet (#3286)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com> Co-authored-by: tison <wander4096@gmail.com>
This commit is contained in:
@@ -698,7 +698,12 @@ impl ParquetReader {
|
||||
};
|
||||
let result = match column_metadata.semantic_type {
|
||||
SemanticType::Tag => {
|
||||
let pk_values = self.codec.decode(input.primary_key())?;
|
||||
let pk_values = if let Some(pk_values) = input.pk_values() {
|
||||
pk_values
|
||||
} else {
|
||||
input.set_pk_values(self.codec.decode(input.primary_key())?);
|
||||
input.pk_values().unwrap()
|
||||
};
|
||||
// Safety: this is a primary key
|
||||
let pk_index = self
|
||||
.read_format
|
||||
@@ -712,7 +717,6 @@ impl ParquetReader {
|
||||
.evaluate_scalar(&pk_value)
|
||||
.context(FilterRecordBatchSnafu)?
|
||||
{
|
||||
input.set_pk_values(pk_values);
|
||||
continue;
|
||||
} else {
|
||||
// PK not match means the entire batch is filtered out.
|
||||
|
||||
Reference in New Issue
Block a user