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 f0090c95ad4e [SPARK-43256][SQL] Remove error class 
_LEGACY_ERROR_TEMP_2021
f0090c95ad4e is described below

commit f0090c95ad4eca18040104848117a7da648ffa3c
Author: andrej-db <andrej.gobel...@databricks.com>
AuthorDate: Tue Feb 27 22:39:41 2024 +0300

    [SPARK-43256][SQL] Remove error class _LEGACY_ERROR_TEMP_2021
    
    ### What changes were proposed in this pull request?
    
    In the PR, I propose to remove the legacy error class 
`_LEGACY_ERROR_TEMP_2021` as it is an internal error.
    ### Why are the changes needed?
    
    User experience improvement w/ Spark SQL.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Tests already exist.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #45198 from andrej-db/SPARK-43256.
    
    Authored-by: andrej-db <andrej.gobel...@databricks.com>
    Signed-off-by: Max Gekk <max.g...@gmail.com>
---
 common/utils/src/main/resources/error/error-classes.json             | 5 -----
 .../src/main/scala/org/apache/spark/sql/errors/ExecutionErrors.scala | 5 +++--
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/common/utils/src/main/resources/error/error-classes.json 
b/common/utils/src/main/resources/error/error-classes.json
index 57ee72c7637f..5313de69cbcd 100644
--- a/common/utils/src/main/resources/error/error-classes.json
+++ b/common/utils/src/main/resources/error/error-classes.json
@@ -5710,11 +5710,6 @@
       "Couldn't find a valid constructor on <cls>."
     ]
   },
-  "_LEGACY_ERROR_TEMP_2021" : {
-    "message" : [
-      "Couldn't find a primary constructor on <cls>."
-    ]
-  },
   "_LEGACY_ERROR_TEMP_2023" : {
     "message" : [
       "Unresolved encoder expected, but <attr> was found."
diff --git 
a/sql/api/src/main/scala/org/apache/spark/sql/errors/ExecutionErrors.scala 
b/sql/api/src/main/scala/org/apache/spark/sql/errors/ExecutionErrors.scala
index 394e56062071..4d0b47d6e93b 100644
--- a/sql/api/src/main/scala/org/apache/spark/sql/errors/ExecutionErrors.scala
+++ b/sql/api/src/main/scala/org/apache/spark/sql/errors/ExecutionErrors.scala
@@ -202,8 +202,9 @@ private[sql] trait ExecutionErrors extends 
DataTypeErrorsBase {
 
   def primaryConstructorNotFoundError(cls: Class[_]): SparkRuntimeException = {
     new SparkRuntimeException(
-      errorClass = "_LEGACY_ERROR_TEMP_2021",
-      messageParameters = Map("cls" -> cls.toString))
+      errorClass = "INTERNAL_ERROR",
+      messageParameters = Map(
+        "message" -> s"Couldn't find a primary constructor on 
${cls.toString}."))
   }
 
   def cannotGetOuterPointerForInnerClassError(innerCls: Class[_]): 
SparkRuntimeException = {


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

Reply via email to