You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/02/12 16:33:18 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #39965: [SPARK-42325][SQL] Assign name to _LEGACY_ERROR_TEMP_0035

MaxGekk commented on code in PR #39965:
URL: https://github.com/apache/spark/pull/39965#discussion_r1103832280


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1179,6 +1179,12 @@
     ],
     "sqlState" : "42826"
   },
+  "OPERATION_NOT_ALLOWED" : {
+    "message" : [
+      "Operation not allowed: <message>."

Review Comment:
   This error classes with `message` is too generic. Could you introduce sub-classes per every `operationNotAllowed` call:
   1. https://github.com/apache/spark/blob/4b50a46f1c6ba4ffe2c42f70a512879c28d11dcf/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L316
   2. https://github.com/apache/spark/blob/4b50a46f1c6ba4ffe2c42f70a512879c28d11dcf/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L333
   3. https://github.com/apache/spark/blob/4b50a46f1c6ba4ffe2c42f70a512879c28d11dcf/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L3139
   4. https://github.com/apache/spark/blob/4b50a46f1c6ba4ffe2c42f70a512879c28d11dcf/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L3170
   5. https://github.com/apache/spark/blob/4b50a46f1c6ba4ffe2c42f70a512879c28d11dcf/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L3183
   6. https://github.com/apache/spark/blob/97a6955278c55fa02cb9f039ae45e49e6f0f2bfd/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L220
   7. https://github.com/apache/spark/blob/97a6955278c55fa02cb9f039ae45e49e6f0f2bfd/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L297
   8. https://github.com/apache/spark/blob/97a6955278c55fa02cb9f039ae45e49e6f0f2bfd/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L317
   9. https://github.com/apache/spark/blob/97a6955278c55fa02cb9f039ae45e49e6f0f2bfd/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L322



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