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/05/03 09:29:38 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #41018: [SPARK-37942][CORE][SQL] Migrate error classes

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


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -235,6 +235,11 @@
     ],
     "sqlState" : "22018"
   },
+  "CORRUPTED_TABLE_PROPERTY" : {
+    "message" : [
+      "Cannot read table property <key> as it's corrupted.<details>"

Review Comment:
   Could you add sub-classes instead of `<details>`, please.



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -235,6 +235,11 @@
     ],
     "sqlState" : "22018"
   },
+  "CORRUPTED_TABLE_PROPERTY" : {

Review Comment:
   Why do you think the properties are corrupted?



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -1349,7 +1351,7 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase {
 
   private def notSupportedForV2TablesError(cmd: String): Throwable = {
     new AnalysisException(
-      errorClass = "_LEGACY_ERROR_TEMP_1124",
+      errorClass = "NOT_SUPPORTED_OPERATION_FOR_V2_TABLE",
       messageParameters = Map("cmd" -> cmd))

Review Comment:
   Please, wrap `cmd` by `toSQLStmt()`.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -2402,12 +2404,14 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase {
         "config" -> SQLConf.ALLOW_NON_EMPTY_LOCATION_IN_CTAS.key))
   }
 
-  def unsetNonExistentPropertyError(property: String, table: TableIdentifier): Throwable = {
+  def unsetNonExistentPropertiesError(properties: Seq[String],
+                                      table: TableIdentifier): Throwable = {

Review Comment:
   Please, fix indentation, see https://github.com/databricks/scala-style-guide#indent



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