This is an automated email from the ASF dual-hosted git repository.

maxgekk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new b0fdecbeb33 [SPARK-40663][SQL][FOLLOW-UP] Remove duplicated unexpected 
data type error message
b0fdecbeb33 is described below

commit b0fdecbeb332258c09638a144bc480ff24706975
Author: Rui Wang <rui.w...@databricks.com>
AuthorDate: Sat Oct 15 08:15:15 2022 +0300

    [SPARK-40663][SQL][FOLLOW-UP] Remove duplicated unexpected data type error 
message
    
    ### What changes were proposed in this pull request?
    
    We have duplicated `unexpected data type error messages`, and we only need 
one:
    ```
      "_LEGACY_ERROR_TEMP_2011" : {
        "message" : [
          "Unexpected data type <dataType>"
        ]
      },
      "_LEGACY_ERROR_TEMP_2012" : {
        "message" : [
          "Unexpected type <dataType>"
        ]
      },
    ```
    
    ### Why are the changes needed?
    
    Remove duplicated error message
    
    ### Does this PR introduce _any_ user-facing change?
    
    No
    
    ### How was this patch tested?
    
    UT
    
    Closes #38261 from amaliujia/SPARK-40663.
    
    Authored-by: Rui Wang <rui.w...@databricks.com>
    Signed-off-by: Max Gekk <max.g...@gmail.com>
---
 core/src/main/resources/error/error-classes.json                     | 5 -----
 .../scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala     | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/core/src/main/resources/error/error-classes.json 
b/core/src/main/resources/error/error-classes.json
index e535901706e..16b08583e71 100644
--- a/core/src/main/resources/error/error-classes.json
+++ b/core/src/main/resources/error/error-classes.json
@@ -3105,11 +3105,6 @@
       "Unexpected data type <dataType>"
     ]
   },
-  "_LEGACY_ERROR_TEMP_2012" : {
-    "message" : [
-      "Unexpected type <dataType>"
-    ]
-  },
   "_LEGACY_ERROR_TEMP_2013" : {
     "message" : [
       "Negative values found in <frequencyExpression>"
diff --git 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
index 034eefe3530..10b197b0b94 100644
--- 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
+++ 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
@@ -402,7 +402,7 @@ private[sql] object QueryExecutionErrors extends 
QueryErrorsBase {
 
   def typeUnsupportedError(dataType: DataType): SparkIllegalArgumentException 
= {
     new SparkIllegalArgumentException(
-      errorClass = "_LEGACY_ERROR_TEMP_2012",
+      errorClass = "_LEGACY_ERROR_TEMP_2011",
       messageParameters = Map("dataType" -> dataType.toString()))
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to