Skip to content

Commit

Permalink
fix Expr::name for struct get
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinzwang committed Feb 2, 2024
1 parent 59af587 commit 58bb051
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/daft-dsl/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use daft_core::{
};

use crate::{
functions::FunctionEvaluator,
functions::{struct_::StructExpr, FunctionEvaluator},
lit,
optimization::{get_required_columns, requires_computation},
};
Expand Down Expand Up @@ -524,7 +524,10 @@ impl Expr {
NotNull(expr) => expr.name(),
IsIn(expr, ..) => expr.name(),
Literal(..) => Ok("literal"),
Function { func: _, inputs } => inputs.first().unwrap().name(),
Function { func, inputs } => match func {
FunctionExpr::Struct(StructExpr::Get(name)) => Ok(name),
_ => inputs.first().unwrap().name(),
},
BinaryOp {
op: _,
left,
Expand Down

0 comments on commit 58bb051

Please sign in to comment.