You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2023/05/29 09:50:19 UTC

[GitHub] [spark] beliefer opened a new pull request, #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

beliefer opened a new pull request, #41366:
URL: https://github.com/apache/spark/pull/41366

   ### What changes were proposed in this pull request?
   The pr aims to assign a name to the error class _LEGACY_ERROR_TEMP_[2418-2425].
   
   
   ### Why are the changes needed?
   Improve the error framework.
   
   
   ### Does this PR introduce _any_ user-facing change?
   'No'.
   
   
   ### How was this patch tested?
   Exists test cases.
   


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


[GitHub] [spark] MaxGekk commented on a diff in pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #41366:
URL: https://github.com/apache/spark/pull/41366#discussion_r1210045740


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1816,6 +1843,11 @@
     ],
     "sqlState" : "42883"
   },
+  "SCALAR_SUBQUERY_IS_IN_GROUP_BY_OR_AGGREGATE_FUNCTION" : {
+    "message" : [
+      "The correlated scalar subquery '<sqlExpr>' is neither present in GROUP BY, nor in an aggregate function. Add it to GROUP BY using ordinal position or wrap it in `first()` (or `first_value`) if you don't care which value you get."

Review Comment:
   Please, remove quotes around <sqlExpr>:
   ```suggestion
         "The correlated scalar subquery <sqlExpr> is neither present in GROUP BY, nor in an aggregate function. Add it to GROUP BY using ordinal position or wrap it in `first()` (or `first_value`) if you don't care which value you get."
   ```



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


[GitHub] [spark] MaxGekk commented on a diff in pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #41366:
URL: https://github.com/apache/spark/pull/41366#discussion_r1209489240


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1,4 +1,9 @@
 {
+  "AGGREGATE_FUNCTION_WITH_NONDETERMINISTIC_EXPRESSION" : {
+    "message" : [
+      "nondeterministic expression <sqlExpr> should not appear in the arguments of an aggregate function."

Review Comment:
   ```suggestion
         "Non-deterministic expression <sqlExpr> should not appear in the arguments of an aggregate function."
   ```



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -42,6 +47,23 @@
     ],
     "sqlState" : "22003"
   },
+  "AS_OF_JOIN" : {
+    "message" : [
+      "Invalid as-of join."
+    ],
+    "subClass" : {
+      "TOLERANCE_IS_NON_NEGATIVE" : {
+        "message" : [
+          "Input argument tolerance must be non-negative."

Review Comment:
   ```suggestion
             "The input argument `tolerance` must be non-negative."
   ```



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -42,6 +47,23 @@
     ],
     "sqlState" : "22003"
   },
+  "AS_OF_JOIN" : {
+    "message" : [
+      "Invalid as-of join."
+    ],
+    "subClass" : {
+      "TOLERANCE_IS_NON_NEGATIVE" : {
+        "message" : [
+          "Input argument tolerance must be non-negative."
+        ]
+      },
+      "TOLERANCE_IS_UNFOLDABLE" : {
+        "message" : [
+          "Input argument tolerance must be a constant."

Review Comment:
   ```suggestion
             "The input argument `tolerance` must be a constant."
   ```



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1816,6 +1843,11 @@
     ],
     "sqlState" : "42883"
   },
+  "SCALAR_SUBQUERY_IS_IN_GROUP_BY_OR_AGGREGATE_FUNCTION" : {
+    "message" : [
+      "Correlated scalar subquery '<sqlExpr>' is neither present in the group by, nor in an aggregate function. Add it to group by using ordinal position or wrap it in first() (or first_value) if you don't care which value you get."

Review Comment:
   ```suggestion
         "The correlated scalar subquery <sqlExpr> is neither present in GROUP BY, nor in an aggregate function. Add it to GROUP BY using ordinal position or wrap it in `first()` (or `first_value`) if you don't care which value you get."
   ```



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -703,6 +725,11 @@
     ],
     "sqlState" : "42805"
   },
+  "GROUP_EXPRESSION_TYPE_IS_NOT_ORDERABLE" : {
+    "message" : [
+      "expression <sqlExpr> cannot be used as a grouping expression because its data type <dataType> is not an orderable data type."

Review Comment:
   ```suggestion
         "The expression <sqlExpr> cannot be used as a grouping expression because its data type <dataType> is not an orderable data type."
   ```



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


[GitHub] [spark] MaxGekk commented on pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #41366:
URL: https://github.com/apache/spark/pull/41366#issuecomment-1570380565

   +1, LGTM. Merging to master.
   Thank you, @beliefer.


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


[GitHub] [spark] beliefer commented on pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #41366:
URL: https://github.com/apache/spark/pull/41366#issuecomment-1568006190

   @MaxGekk The failure GA is unrelated to this PR.


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


[GitHub] [spark] MaxGekk commented on pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #41366:
URL: https://github.com/apache/spark/pull/41366#issuecomment-1568479654

   @beliefer I am not sure about the failed test. Could you re-trigger the GAs:
   ```
   MicroBatchExecutionSuite.error notifier test
   org.scalatest.exceptions.TestFailedException: Expected exception org.apache.spark.sql.streaming.StreamingQueryException to be thrown, but org.scalatest.exceptions.TestFailedException was thrown
   ```


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


[GitHub] [spark] MaxGekk closed pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425
URL: https://github.com/apache/spark/pull/41366


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


[GitHub] [spark] beliefer commented on pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #41366:
URL: https://github.com/apache/spark/pull/41366#issuecomment-1571207939

   @MaxGekk Thank you!


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


[GitHub] [spark] beliefer commented on a diff in pull request #41366: [SPARK-43852][SPARK-43853][SPARK-43854][SPARK-43855][SPARK-43856] Assign names to the error class _LEGACY_ERROR_TEMP_2418-2425

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #41366:
URL: https://github.com/apache/spark/pull/41366#discussion_r1209617132


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1816,6 +1843,11 @@
     ],
     "sqlState" : "42883"
   },
+  "SCALAR_SUBQUERY_IS_IN_GROUP_BY_OR_AGGREGATE_FUNCTION" : {
+    "message" : [
+      "Correlated scalar subquery '<sqlExpr>' is neither present in the group by, nor in an aggregate function. Add it to group by using ordinal position or wrap it in first() (or first_value) if you don't care which value you get."

Review Comment:
   Got it. @MaxGekk thank you.



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