From 58bb051b8be1121de4a78c5dd90dd8b0c4dc58e6 Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Thu, 1 Feb 2024 16:12:24 -0800 Subject: [PATCH] fix Expr::name for struct get --- src/daft-dsl/src/expr.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/daft-dsl/src/expr.rs b/src/daft-dsl/src/expr.rs index 770af0a049..966e3d61d0 100644 --- a/src/daft-dsl/src/expr.rs +++ b/src/daft-dsl/src/expr.rs @@ -7,7 +7,7 @@ use daft_core::{ }; use crate::{ - functions::FunctionEvaluator, + functions::{struct_::StructExpr, FunctionEvaluator}, lit, optimization::{get_required_columns, requires_computation}, }; @@ -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,