mbutrovich commented on code in PR #1874: URL: https://github.com/apache/datafusion-comet/pull/1874#discussion_r2152838275
########## native/core/src/execution/planner.rs: ########## @@ -460,22 +459,40 @@ impl PhysicalPlanner { ))) } ExprStruct::Hour(expr) => { - let child = self.create_expr(expr.child.as_ref().unwrap(), input_schema)?; + let child = + self.create_expr(expr.child.as_ref().unwrap(), Arc::clone(&input_schema))?; let timezone = expr.timezone.clone(); + let args = vec![child]; + let comet_hour = Arc::new(ScalarUDF::new_from_impl(SparkHour::new(timezone))); + let field_ref = Arc::new(Field::new("hour", DataType::Int32, true)); + let expr: ScalarFunctionExpr = + ScalarFunctionExpr::new("hour", comet_hour, args, field_ref); - Ok(Arc::new(HourExpr::new(child, timezone))) + Ok(Arc::new(expr)) } ExprStruct::Minute(expr) => { - let child = self.create_expr(expr.child.as_ref().unwrap(), input_schema)?; + let child = + self.create_expr(expr.child.as_ref().unwrap(), Arc::clone(&input_schema))?; let timezone = expr.timezone.clone(); + let args = vec![child]; + let comet_minute = Arc::new(ScalarUDF::new_from_impl(SparkMinute::new(timezone))); + let field_ref = Arc::new(Field::new("hour", DataType::Int32, true)); Review Comment: Are these references to "hour" in `ExprStruct::Minute` and `ExprStruct::Second` correct? -- 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