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


##########
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:
   For calling scalar udfs, you can take a look at 
`scalarExprToProtoWithReturnType` or `scalarExprToProto` in `QueryPlanSerde`
   
   By using these, we can omit `planner` change or `proto` definition.



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

Reply via email to