Skip to content

Commit c2c5abe

Browse files
committed
fix
1 parent 67180a1 commit c2c5abe

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

datafusion/expr/src/expr_rewriter/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ pub fn create_col_from_scalar_expr(
174174
subqry_alias: String,
175175
) -> Result<Column> {
176176
match scalar_expr {
177-
Expr::Alias(alias_box) => {
178-
// alias_box: &Box<Alias> (if you’re matching on &expr) or Box<Alias>
179-
let name = &alias_box.name;
177+
Expr::Alias(boxed_alias) => {
178+
// boxed_alias: &Box<Alias> (if you’re matching on &expr) or Box<Alias>
179+
let name = &boxed_alias.name;
180180
Ok(Column::new(
181181
Some::<TableReference>(subqry_alias.into()),
182182
name,
@@ -256,9 +256,9 @@ fn coerce_exprs_for_schema(
256256
let new_type = dst_schema.field(idx).data_type();
257257
if new_type != &expr.get_type(src_schema)? {
258258
match expr {
259-
Expr::Alias(alias_box) => {
260-
// alias_box: Box<Alias>
261-
let Alias { expr, name, .. } = *alias_box;
259+
Expr::Alias(boxed_alias) => {
260+
// boxed_alias: Box<Alias>
261+
let Alias { expr, name, .. } = *boxed_alias;
262262
Ok(expr.cast_to(new_type, src_schema)?.alias(name))
263263
}
264264
#[expect(deprecated)]

datafusion/expr/src/expr_rewriter/order_by.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ fn rewrite_in_terms_of_projection(
137137
/// so avg(c) as average will match avgc
138138
fn expr_match(needle: &Expr, expr: &Expr) -> bool {
139139
// check inside aliases
140-
if let Expr::Alias(alias_box) = expr {
141-
// alias_box: &Box<Alias>, so alias_box.as_ref() is &Alias
142-
let alias: &Alias = alias_box.as_ref();
140+
if let Expr::Alias(boxed_alias) = expr {
141+
// boxed_alias: &Box<Alias>, so boxed_alias.as_ref() is &Alias
142+
let alias: &Alias = boxed_alias.as_ref();
143143
// alias.expr: Box<Expr>, so alias.expr.as_ref() is &Expr
144144
alias.expr.as_ref() == needle
145145
} else {

datafusion/expr/src/expr_schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ impl ExprSchemable for Expr {
244244
/// column that does not exist in the schema.
245245
fn nullable(&self, input_schema: &dyn ExprSchema) -> Result<bool> {
246246
match self {
247-
Expr::Alias(alias_box) => {
248-
let Alias { expr, .. } = alias_box.as_ref();
247+
Expr::Alias(boxed_alias) => {
248+
let Alias { expr, .. } = boxed_alias.as_ref();
249249
expr.nullable(input_schema)
250250
}
251251
Expr::Not(expr) | Expr::Negative(expr) => expr.nullable(input_schema),

datafusion/expr/src/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,8 @@ pub fn iter_conjunction(expr: &Expr) -> impl Iterator<Item = &Expr> {
971971
stack.push(right);
972972
stack.push(left);
973973
}
974-
Expr::Alias(alias_box) => {
975-
stack.push(&*alias_box.expr);
974+
Expr::Alias(boxed_alias) => {
975+
stack.push(&*boxed_alias.expr);
976976
}
977977
other => return Some(other),
978978
}
@@ -997,7 +997,7 @@ pub fn iter_conjunction_owned(expr: Expr) -> impl Iterator<Item = Expr> {
997997
stack.push(*right);
998998
stack.push(*left);
999999
}
1000-
Expr::Alias(alias_box) => stack.push(*alias_box.expr),
1000+
Expr::Alias(boxed_alias) => stack.push(*boxed_alias.expr),
10011001
other => return Some(other),
10021002
}
10031003
}

0 commit comments

Comments
 (0)