andygrove commented on code in PR #1321: URL: https://github.com/apache/datafusion-comet/pull/1321#discussion_r1931054744
########## spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala: ########## @@ -2428,6 +2428,22 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim withInfo(expr, "unsupported arguments for ArrayJoin", exprs: _*) None } + case expr @ ArrayFilter(child, _) if ArrayCompact(child).replacement.sql == expr.sql => + val elementType = serializeDataType(child.dataType.asInstanceOf[ArrayType].elementType) + val srcExprProto = exprToProto(child, inputs, binding) + if (elementType.isDefined && srcExprProto.isDefined) { + val arrayCompactBuilder = ExprOuterClass.ArrayCompact + .newBuilder() + .setArrayExpr(srcExprProto.get) + .setItemDatatype(elementType.get) + Some( + ExprOuterClass.Expr + .newBuilder() + .setArrayCompact(arrayCompactBuilder) + .build()) + } else { + None Review Comment: There should be a call to `withInfo` in the case where `elementType` is not supported so that the user sees the reason why it is not supported. There are examples of this for the other array functions. -- 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