Kimahriman commented on code in PR #793:
URL: https://github.com/apache/datafusion-comet/pull/793#discussion_r1711322564


##########
native/core/src/execution/datafusion/planner.rs:
##########
@@ -623,6 +624,21 @@ impl PhysicalPlanner {
                 let child = self.create_expr(expr.child.as_ref().unwrap(), 
input_schema.clone())?;
                 Ok(Arc::new(GetStructField::new(child, expr.ordinal as usize)))
             }
+            ExprStruct::CreateArray(expr) => {
+                let values = expr
+                    .values
+                    .iter()
+                    .map(|expr| self.create_expr(expr, input_schema.clone()))
+                    .collect::<Result<Vec<_>, _>>()?;
+                let data_type = 
to_arrow_datatype(expr.datatype.as_ref().unwrap());
+
+                Ok(Arc::new(ScalarFunctionExpr::new(
+                    "make_array",
+                    make_array_udf(),
+                    values,
+                    data_type,
+                )))

Review Comment:
   Thanks, updated to use `scalarExprToProtoWithReturnType`. Had to register 
the nested functions in the functions registry as well.



-- 
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