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/07/05 09:22:59 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #41858: [SPARK-44299][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_227[4-6,8]

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


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -1740,6 +1750,11 @@
     ],
     "sqlState" : "23K01"
   },
+  "MISMATCH_NUMBER_FORMAT" : {

Review Comment:
   Maybe a sub-class of `INVALID_FORMAT` or re-use an existing one?



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -2592,14 +2592,14 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase {
 
   def nestedFieldUnsupportedError(colName: String): SparkUnsupportedOperationException = {
     new SparkUnsupportedOperationException(
-      errorClass = "_LEGACY_ERROR_TEMP_2274",
+      errorClass = "REPLACE_NESTED_COLUMN_IS_UNSUPPORTED",
       messageParameters = Map(
         "colName" -> colName))

Review Comment:
   ```suggestion
         messageParameters = Map("colName" -> toSQLId(colName)))
   ```



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -2671,9 +2671,10 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase {
         "functionName" -> toSQLId("aes_encrypt")))
   }
 
-  def hiveTableWithAnsiIntervalsError(tableName: String): SparkUnsupportedOperationException = {
+  def hiveTableWithAnsiIntervalsError(
+      tableName: String): SparkUnsupportedOperationException = {
     new SparkUnsupportedOperationException(
-      errorClass = "_LEGACY_ERROR_TEMP_2276",
+      errorClass = "HIVE_WITH_ANSI_INTERVALS_IS_UNSUPPORTED",
       messageParameters = Map("tableName" -> tableName))

Review Comment:
   Please, quote by `toSQLId`



##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -792,6 +797,11 @@
       "The expression <sqlExpr> cannot be used as a grouping expression because its data type <dataType> is not an orderable data type."
     ]
   },
+  "HIVE_WITH_ANSI_INTERVALS_IS_UNSUPPORTED" : {

Review Comment:
   How about a sub-class of `UNSUPPORTED_FEATURE`?



##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -2114,6 +2129,11 @@
     ],
     "sqlState" : "42614"
   },
+  "REPLACE_NESTED_COLUMN_IS_UNSUPPORTED" : {

Review Comment:
   Sub-class of `UNSUPPORTED_FEATURE`?



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