vaibhawvipul commented on code in PR #471: URL: https://github.com/apache/datafusion-comet/pull/471#discussion_r1616794656
########## core/src/execution/datafusion/planner.rs: ########## @@ -566,8 +567,23 @@ impl PhysicalPlanner { Ok(Arc::new(NotExpr::new(child))) } ExprStruct::Negative(expr) => { - let child = self.create_expr(expr.child.as_ref().unwrap(), input_schema)?; - Ok(Arc::new(NegativeExpr::new(child))) + let child: Arc<dyn PhysicalExpr> = + self.create_expr(expr.child.as_ref().unwrap(), input_schema.clone())?; + let eval_mode = match expr.eval_mode.as_str() { + "ANSI" => EvalMode::Ansi, + "TRY" => EvalMode::Try, + "LEGACY" => EvalMode::Legacy, + other => { + return Err(ExecutionError::GeneralError(format!( + "Invalid EvalMode: \"{other}\"" + ))) + } + }; Review Comment: This is nice but I don't see EvalMode in spark_expressions. I took inspiration from here, Cast expression does similar match - https://github.com/apache/datafusion-comet/pull/471/files#diff-264772aa6994f16ba436ff47d7d15a126e58e78a46d617f22107b376dfbd31e8L351 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org