eejbyfeldt commented on code in PR #620:
URL: https://github.com/apache/datafusion-comet/pull/620#discussion_r1662997372


##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -2141,6 +2141,25 @@ object QueryPlanSerde extends Logging with 
ShimQueryPlanSerde with CometExprShim
             scalarExprToProtoWithReturnType(algorithm, StringType, childExpr)
           }
 
+        case struct @ CreateNamedStruct(_) =>
+          val valExprs = struct.valExprs.map(exprToProto(_, inputs, binding))
+          val dataType = serializeDataType(struct.dataType)
+
+          if (valExprs.forall(_.isDefined) && dataType.isDefined) {
+            val structBuilder = ExprOuterClass.CreateNamedStruct.newBuilder()
+            structBuilder.addAllValues(valExprs.map(_.get).asJava)
+            structBuilder.setDatatype(dataType.get)
+
+            Some(
+              ExprOuterClass.Expr
+                .newBuilder()
+                .setCreateNamedStruct(structBuilder)
+                .build())
+          } else {
+            withInfo(expr, struct.valExprs: _*)

Review Comment:
   Based on this comment here 
https://github.com/apache/datafusion-comet/blob/7d6ad4bfe356e69751478ac5d0c4ad240966deb3/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala#L1085-L1086
 it sounds like we would still get the errors from the children which should 
contain the root issue. So it not clear to me we would be able to provide any 
additional useful information here.



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