test: update tests

Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
discord9
2026-03-04 11:20:21 +08:00
parent dd301384d9
commit 9b9b895d41

View File

@@ -563,7 +563,7 @@ mod tests {
.try_as_logical_expr()
.unwrap()
.to_string(),
"a > Int64(10) OR a IS NULL"
"a > Int64(10)"
);
// Test Gt with column on LHS
@@ -574,7 +574,7 @@ mod tests {
);
assert_eq!(
gt_expr.try_as_logical_expr().unwrap().to_string(),
"a > Int64(10) OR a IS NULL"
"a > Int64(10)"
);
// Test Gt with column on RHS
@@ -599,7 +599,7 @@ mod tests {
);
assert_eq!(
gteq_expr.try_as_logical_expr().unwrap().to_string(),
"a >= Int64(10) OR a IS NULL"
"a >= Int64(10)"
);
// Test LtEq with column on LHS
@@ -612,6 +612,32 @@ mod tests {
lteq_expr.try_as_logical_expr().unwrap().to_string(),
"a <= Int64(10) OR a IS NULL"
);
let gteq_expr_rhs_column = PartitionExpr::new(
Operand::Value(Value::Int64(10)),
RestrictedOp::GtEq,
Operand::Column("a".to_string()),
);
assert_eq!(
gteq_expr_rhs_column
.try_as_logical_expr()
.unwrap()
.to_string(),
"a <= Int64(10) OR a IS NULL"
);
let lteq_expr_rhs_column = PartitionExpr::new(
Operand::Value(Value::Int64(10)),
RestrictedOp::LtEq,
Operand::Column("a".to_string()),
);
assert_eq!(
lteq_expr_rhs_column
.try_as_logical_expr()
.unwrap()
.to_string(),
"a >= Int64(10)"
);
}
#[test]