comphead commented on code in PR #3036:
URL: https://github.com/apache/datafusion-comet/pull/3036#discussion_r2669819226
##########
spark/src/main/scala/org/apache/comet/serde/arrays.scala:
##########
@@ -546,26 +546,55 @@ object CometArrayFilter extends
CometExpressionSerde[ArrayFilter] {
object CometSize extends CometExpressionSerde[Size] {
override def getSupportLevel(expr: Size): SupportLevel = {
- // TODO respect spark.sql.legacy.sizeOfNull
expr.child.dataType match {
case _: ArrayType => Compatible()
case _: MapType => Unsupported(Some("size does not support map inputs"))
case other =>
// this should be unreachable because Spark only supports map and
array inputs
Unsupported(Some(s"Unsupported child data type: $other"))
}
-
}
override def convert(
expr: Size,
inputs: Seq[Attribute],
binding: Boolean): Option[ExprOuterClass.Expr] = {
val arrayExprProto = exprToProto(expr.child, inputs, binding)
+ for {
+ isNotNullExprProto <- createIsNotNullExprProto(expr, inputs, binding)
+ sizeScalarExprProto <- scalarFunctionExprToProto("size", arrayExprProto)
+ emptyLiteralExprProto <- createLiteralExprProto(expr.legacySizeOfNull)
Review Comment:
should we also refer to ansi mode?
--
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]