dharanad commented on code in PR #11273:
URL: https://github.com/apache/datafusion/pull/11273#discussion_r1667401277


##########
datafusion/functions/src/core/planner.rs:
##########
@@ -38,3 +40,28 @@ impl UserDefinedSQLPlanner for CoreFunctionPlanner {
         Ok(PlannerResult::Planned(named_struct().call(args)))
     }
 }
+
+#[derive(Default)]
+pub struct CreateStructPlanner;
+
+impl UserDefinedSQLPlanner for CreateStructPlanner {
+    fn plan_create_struct(&self, args: Vec<Expr>) -> 
Result<PlannerResult<Vec<Expr>>> {
+        Ok(PlannerResult::Planned(Expr::ScalarFunction(
+            ScalarFunction::new_udf(crate::core::r#struct(), args),

Review Comment:
   Great idea @jayzhan211 . I will see if i can incorpoate this change in the 
PR or have a new for this.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to