You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/09/01 02:23:46 UTC
[GitHub] [spark] cloud-fan commented on a diff in pull request #37749: [SPARK-40295][SQL] Allow v2 functions with literal args in write distribution/ordering
cloud-fan commented on code in PR #37749:
URL: https://github.com/apache/spark/pull/37749#discussion_r960163485
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/V2ExpressionUtils.scala:
##########
@@ -105,18 +105,27 @@ object V2ExpressionUtils extends SQLConfHelper with Logging {
TransformExpression(bound, resolvedRefs, Some(numBuckets))
}
}
- case NamedTransform(name, refs)
- if refs.length == 1 && refs.forall(_.isInstanceOf[NamedReference]) =>
- val resolvedRefs = refs.map(_.asInstanceOf[NamedReference]).map { r =>
- resolveRef[NamedExpression](r, query)
- }
+ case NamedTransform(name, args) =>
+ val catalystArgs = convertTransformArgs(args, query)
Review Comment:
what if we simply call `args.map(toCatalyst)` here? This means that we can support nested v2 transforms.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org