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/01/17 07:31:03 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #35207: [SPARK-37907][SQL] InvokeLike support ConstantFolding
cloud-fan commented on a change in pull request #35207:
URL: https://github.com/apache/spark/pull/35207#discussion_r785697709
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
##########
@@ -50,6 +50,8 @@ trait InvokeLike extends Expression with NonSQLExpression with ImplicitCastInput
def propagateNull: Boolean
+ override def foldable: Boolean =
+ children.forall(_.foldable) && !dataType.isInstanceOf[ObjectType]
Review comment:
We must exclude `ObjectType` otherwise constant folding will fail when it tries to create a literal with `ObjectType`.
--
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