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/10/07 18:49:07 UTC

[GitHub] [spark] amaliujia commented on a diff in pull request #38050: [SPARK-40615][SQL] Check unsupported data types when decorrelating subqueries

amaliujia commented on code in PR #38050:
URL: https://github.com/apache/spark/pull/38050#discussion_r990410758


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -879,6 +879,11 @@
           "Expressions referencing the outer query are not supported outside of WHERE/HAVING clauses<treeNode>"
         ]
       },
+      "UNSUPPORTED_CORRELATED_REFERENCE_DATA_TYPE" : {
+        "message" : [
+          "Correlated column reference '<expr>' cannot be <dataType> type"

Review Comment:
   +1 this is better!



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/DecorrelateInnerQuery.scala:
##########
@@ -369,7 +370,7 @@ object DecorrelateInnerQuery extends PredicateHelper {
                   throw QueryCompilationErrors.unsupportedCorrelatedReferenceDataTypeError(
                     o, a.dataType, plan.origin)
                 } else {
-                  throw new IllegalStateException(s"Unable to decorrelate subquery: " +
+                  throw SparkException.internalError(s"Unable to decorrelate subquery: " +

Review Comment:
   Why this change?



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -3138,4 +3138,4 @@
       "<className> must override either <m1> or <m2>"
     ]
   }
-}
+}

Review Comment:
   Bit revert this.



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