Skip to content

Commit 9d93175

Browse files
committed
Merge remote-tracking branch 'sundyli/tpcds-1g' into iceberg-hdfs
2 parents d2873e1 + 16330a3 commit 9d93175

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

src/common/storage/src/statistics.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,19 @@ impl Datum {
184184
}
185185

186186
pub fn can_compare(&self, other: &Self) -> bool {
187-
match (self, other) {
187+
matches!(
188+
(self, other),
188189
(Datum::Bool(_), Datum::Bool(_))
189-
| (Datum::Int(_), Datum::Int(_))
190-
| (Datum::Int(_), Datum::UInt(_))
191-
| (Datum::Int(_), Datum::Float(_))
192-
| (Datum::UInt(_), Datum::UInt(_))
193-
| (Datum::UInt(_), Datum::Int(_))
194-
| (Datum::UInt(_), Datum::Float(_))
195-
| (Datum::Float(_), Datum::Float(_))
196-
| (Datum::Float(_), Datum::Int(_))
197-
| (Datum::Float(_), Datum::UInt(_))
198-
| (Datum::Bytes(_), Datum::Bytes(_)) => true,
199-
_ => false,
200-
}
190+
| (Datum::Int(_), Datum::Int(_))
191+
| (Datum::Int(_), Datum::UInt(_))
192+
| (Datum::Int(_), Datum::Float(_))
193+
| (Datum::UInt(_), Datum::UInt(_))
194+
| (Datum::UInt(_), Datum::Int(_))
195+
| (Datum::UInt(_), Datum::Float(_))
196+
| (Datum::Float(_), Datum::Float(_))
197+
| (Datum::Float(_), Datum::Int(_))
198+
| (Datum::Float(_), Datum::UInt(_))
199+
| (Datum::Bytes(_), Datum::Bytes(_))
200+
)
201201
}
202202
}

src/query/sql/src/planner/optimizer/property/selectivity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ impl<'a> SelectivityEstimator<'a> {
442442
let lower_bound = bucket.lower_bound();
443443
let upper_bound = bucket.upper_bound();
444444

445-
if !const_datum.can_compare(&lower_bound) {
445+
if !const_datum.can_compare(lower_bound) {
446446
return Ok(DEFAULT_SELECTIVITY);
447447
}
448448

src/query/sql/src/planner/semantic/type_check.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3183,7 +3183,8 @@ impl<'a> TypeChecker<'a> {
31833183
.contains(func.name.to_string());
31843184
}
31853185
fn enter_expr(&mut self, expr: &Expr) {
3186-
self.contain_agg = matches!(expr, Expr::CountAll { window: None, .. });
3186+
self.contain_agg = self.contain_agg
3187+
|| matches!(expr, Expr::CountAll { window: None, .. });
31873188
}
31883189
}
31893190
let mut visitor = AggFuncVisitor { contain_agg: false };

0 commit comments

Comments
 (0)