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 0b2eca28c307 [SPARK-47245][SQL] Improve error code for 
INVALID_PARTITION_COLUMN_DATA_TYPE
0b2eca28c307 is described below

commit 0b2eca28c307b4feb4edd1f53c9aecc64523b7eb
Author: Stefan Kandic <stefan.kan...@databricks.com>
AuthorDate: Mon Mar 4 19:58:52 2024 +0300

    [SPARK-47245][SQL] Improve error code for INVALID_PARTITION_COLUMN_DATA_TYPE
    
    ### What changes were proposed in this pull request?
    
    Improving the error code for error class 
`INVALID_PARTITION_COLUMN_DATA_TYPE`.
    
    ### Why are the changes needed?
    
    `0A000` means a feature is not supported, It implies that in some future it 
may be and the user hit a limit rather than just writing something inherently 
wrong.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes, new sql error code
    
    ### How was this patch tested?
    
    UTs
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    Closes #45355 from stefankandic/SPARK-47245-improveErrorCode.
    
    Authored-by: Stefan Kandic <stefan.kan...@databricks.com>
    Signed-off-by: Max Gekk <max.g...@gmail.com>
---
 common/utils/src/main/resources/error/error-classes.json | 2 +-
 docs/sql-error-conditions.md                             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/utils/src/main/resources/error/error-classes.json 
b/common/utils/src/main/resources/error/error-classes.json
index 493635d1f8d3..6ccd841ccd0f 100644
--- a/common/utils/src/main/resources/error/error-classes.json
+++ b/common/utils/src/main/resources/error/error-classes.json
@@ -2325,7 +2325,7 @@
     "message" : [
       "Cannot use <type> for partition column."
     ],
-    "sqlState" : "42601"
+    "sqlState" : "0A000"
   },
   "INVALID_PARTITION_OPERATION" : {
     "message" : [
diff --git a/docs/sql-error-conditions.md b/docs/sql-error-conditions.md
index 510f56f413c6..f026c456eb2d 100644
--- a/docs/sql-error-conditions.md
+++ b/docs/sql-error-conditions.md
@@ -1320,7 +1320,7 @@ For more details see 
[INVALID_PARAMETER_VALUE](sql-error-conditions-invalid-para
 
 ### INVALID_PARTITION_COLUMN_DATA_TYPE
 
-[SQLSTATE: 
42601](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation)
+[SQLSTATE: 
0A000](sql-error-conditions-sqlstates.html#class-0A-feature-not-supported)
 
 Cannot use `<type>` for partition column.
 


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

Reply via email to