You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2023/06/05 19:21:04 UTC

[spark] branch master updated: [SPARK-42299] Assign name to _LEGACY_ERROR_TEMP_2206

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 16ee478a9de [SPARK-42299] Assign name to _LEGACY_ERROR_TEMP_2206
16ee478a9de is described below

commit 16ee478a9debe94eadbf62ead072c2ded10220c7
Author: Amanda Liu <am...@databricks.com>
AuthorDate: Mon Jun 5 22:19:38 2023 +0300

    [SPARK-42299] Assign name to _LEGACY_ERROR_TEMP_2206
    
    ### What changes were proposed in this pull request?
    The PR assigns a more descriptive name to the error class `_LEGACY_ERROR_TEMP_2206` -> `BATCH_METADATA_NOT_FOUND`
    
    ### Why are the changes needed?
    This change improves the error framework by making the error name more descriptive.
    
    ### Does this PR introduce any user-facing change?
    No
    
    ### How was this patch tested?
    The error test will be handled in a future PR (see JIRA ticket: https://issues.apache.org/jira/browse/SPARK-43940)
    
    Closes #41387 from asl3/_LEGACY_ERROR_TEMP_2206.
    
    Lead-authored-by: Amanda Liu <am...@databricks.com>
    Co-authored-by: asl3 <am...@databricks.com>
    Signed-off-by: Max Gekk <ma...@gmail.com>
---
 core/src/main/resources/error/error-classes.json              | 11 ++++++-----
 .../org/apache/spark/sql/errors/QueryExecutionErrors.scala    |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/core/src/main/resources/error/error-classes.json b/core/src/main/resources/error/error-classes.json
index c73223fba39..2da08829862 100644
--- a/core/src/main/resources/error/error-classes.json
+++ b/core/src/main/resources/error/error-classes.json
@@ -74,6 +74,12 @@
       "Cannot convert Avro <avroPath> to SQL <sqlPath> because the original encoded data type is <avroType>, however you're trying to read the field as <sqlType>, which leads to data being read as null. Please provide a wider decimal type to get the correct result. To allow reading null to this field, enable the SQL configuration: <key>."
     ]
   },
+  "BATCH_METADATA_NOT_FOUND" : {
+    "message" : [
+      "Unable to find batch <batchMetadataFile>."
+    ],
+    "sqlState" : "42K03"
+  },
   "BINARY_ARITHMETIC_OVERFLOW" : {
     "message" : [
       "<value1> <symbol> <value2> caused overflow."
@@ -4978,11 +4984,6 @@
       "Cannot set timeout timestamp without enabling event time timeout in [map|flatMapGroupsWithState."
     ]
   },
-  "_LEGACY_ERROR_TEMP_2206" : {
-    "message" : [
-      "Unable to find batch <batchMetadataFile>."
-    ]
-  },
   "_LEGACY_ERROR_TEMP_2207" : {
     "message" : [
       "Multiple streaming queries are concurrently using <path>."
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 7ce3e7a9e7e..fd09e99b9ee 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
@@ -2011,7 +2011,7 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase {
 
   def batchMetadataFileNotFoundError(batchMetadataFile: Path): SparkFileNotFoundException = {
     new SparkFileNotFoundException(
-      errorClass = "_LEGACY_ERROR_TEMP_2206",
+      errorClass = "BATCH_METADATA_NOT_FOUND",
       messageParameters = Map(
         "batchMetadataFile" -> batchMetadataFile.toString()))
   }


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