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/08/17 07:08:35 UTC

[GitHub] [spark] gengliangwang commented on a diff in pull request #37548: [SPARK-40066][SQL][FOLLOW-UP] Check if ElementAt is resolved before getting its dataType

gengliangwang commented on code in PR #37548:
URL: https://github.com/apache/spark/pull/37548#discussion_r947528023


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala:
##########
@@ -2272,7 +2272,7 @@ case class ElementAt(
     newLeft: Expression, newRight: Expression): ElementAt = copy(left = newLeft, right = newRight)
 
   override def initQueryContext(): Option[SQLQueryContext] = {
-    if (failOnError && left.dataType.isInstanceOf[ArrayType]) {
+    if (failOnError && left.resolved && left.dataType.isInstanceOf[ArrayType]) {

Review Comment:
   This should work. Probably there is a better way.



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