You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2023/07/21 13:14:57 UTC

[GitHub] [spark] panbingkun opened a new pull request, #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

panbingkun opened a new pull request, #42109:
URL: https://github.com/apache/spark/pull/42109

   ### What changes were proposed in this pull request?
   
   
   ### Why are the changes needed?
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   
   ### How was this patch tested?
   - Pass GA.
   - Update UT


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


[GitHub] [spark] panbingkun commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1288316660


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {

Review Comment:
   This is a difficult problem. 
   If we merge `UNSUPPORTED_FEATURE.TABLE_OPERATION` to `UNSUPPORTED_TABLE_OPERATION.WITH_SUGGESTION`, 
   we need to assign a new suitable subclass name for it, because it is different from `UNSUPPORTED_TABLE_OPERATION.WITH_SUGGESTION`'s suggestion information.
   
   Should we do this?
   



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


[GitHub] [spark] panbingkun commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1288295415


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {
+    "message" : [
+      "Table <tableName> does not support <operation>."
+    ],
+    "subClass" : {
+      "WITHOUT_SUGGESTION" : {
+        "message" : [
+          ""
+        ]
+      },
+      "WITH_SUGGESTION" : {
+        "message" : [
+          "<suggestion>."

Review Comment:
   Done



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


[GitHub] [spark] MaxGekk commented on pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #42109:
URL: https://github.com/apache/spark/pull/42109#issuecomment-1675759079

   +1, LGTM. Merging to master.
   Thank you, @panbingkun.


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


[GitHub] [spark] cloud-fan commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1315350627


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1134,20 +1134,21 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor
           case v: ResolvedPersistentView =>
             val nameParts = v.catalog.name() +: v.identifier.asMultipartIdentifier
             throw QueryCompilationErrors.expectTableNotViewError(
-              nameParts, isTemp = false, cmd, relationTypeMismatchHint, u)
+              nameParts, isTemp = false, cmd, true, u)

Review Comment:
   why do we pass `true` directly? shall we use `UnresolvedTable#hint`?



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


[GitHub] [spark] cloud-fan commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1315376064


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {

Review Comment:
   This is too general, but what we actually report is relation type mismatch. How about
   ```
   "UNEXPECTED_RELATION_TYPE": "<name> is a <actualType>. '<cmd>' expects a <expectedType>."
   "subClass": {
     "WITHOUT_SUGGESTION": "",
     "WITH_ALTER_COMMAND_SUGGESTION": "Please use ALTER <expectedType> instead."
   }
   ```



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


[GitHub] [spark] panbingkun commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1315780224


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1134,20 +1134,21 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor
           case v: ResolvedPersistentView =>
             val nameParts = v.catalog.name() +: v.identifier.asMultipartIdentifier
             throw QueryCompilationErrors.expectTableNotViewError(
-              nameParts, isTemp = false, cmd, relationTypeMismatchHint, u)
+              nameParts, isTemp = false, cmd, true, u)

Review Comment:
   Because we put the content of hint in error-classes.json



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


[GitHub] [spark] MaxGekk commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1281470846


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {
+    "message" : [
+      "Table <tableName> does not support <operation>."
+    ],
+    "subClass" : {
+      "WITHOUT_SUGGESTION" : {
+        "message" : [
+          ""
+        ]
+      },
+      "WITH_SUGGESTION" : {
+        "message" : [
+          "<suggestion>."
+        ]
+      }
+    }
+  },
+  "UNSUPPORTED_TEMP_VIEW_OPERATION" : {
+    "message" : [
+      "Temp view <tempViewName> does not support <operation>."

Review Comment:
   ```suggestion
         "The temp view <tempViewName> does not support <operation>."
   ```



##########
R/pkg/tests/fulltests/test_sparkSQL.R:
##########
@@ -4193,8 +4193,9 @@ test_that("catalog APIs, listTables, getTable, listColumns, listFunctions, funct
 
   # recoverPartitions does not work with temporary view
   expect_error(recoverPartitions("cars"),
-               paste("Error in recoverPartitions : analysis error - cars is a temp view.",
-                     "'recoverPartitions()' expects a table"), fixed = TRUE)
+               paste("Error in recoverPartitions : analysis error -",
+                     "[UNSUPPORTED_TEMP_VIEW_OPERATION.WITH_SUGGESTION]",
+                     "Temp view `cars` does not support recoverPartitions()"), fixed = TRUE)

Review Comment:
   Could you check the error class only. See other checks in the same file.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -464,49 +465,57 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase {
       cmd: String,
       mismatchHint: Option[String],
       t: TreeNode[_]): Throwable = {
-    val viewStr = if (isTemp) "temp view" else "view"
-    val hintStr = mismatchHint.map(" " + _).getOrElse("")
-    new AnalysisException(
-      errorClass = "_LEGACY_ERROR_TEMP_1013",
-      messageParameters = Map(
-        "nameParts" -> nameParts.quoted,
-        "viewStr" -> viewStr,
-        "cmd" -> cmd,
-        "hintStr" -> hintStr),
-      origin = t.origin)
+    val suggestion = mismatchHint.map(" " + _).getOrElse("")
+    if (isTemp) {
+      new AnalysisException(
+        errorClass = "UNSUPPORTED_TEMP_VIEW_OPERATION.WITH_SUGGESTION",
+        messageParameters = Map(
+          "tempViewName" -> toSQLId(nameParts),
+          "operation" -> cmd,
+          "suggestion" -> suggestion),
+        origin = t.origin)
+    } else {
+      new AnalysisException(
+        errorClass = "UNSUPPORTED_VIEW_OPERATION.WITH_SUGGESTION",
+        messageParameters = Map(
+          "viewName" -> toSQLId(nameParts),
+          "operation" -> cmd,
+          "suggestion" -> suggestion),
+        origin = t.origin)
+    }
   }
 
   def expectViewNotTempViewError(
       nameParts: Seq[String],
       cmd: String,
       t: TreeNode[_]): Throwable = {
     new AnalysisException(
-      errorClass = "_LEGACY_ERROR_TEMP_1014",
+      errorClass = "UNSUPPORTED_TEMP_VIEW_OPERATION.WITHOUT_SUGGESTION",
       messageParameters = Map(
-        "nameParts" -> nameParts.quoted,
-        "cmd" -> cmd),
+        "tempViewName" -> toSQLId(nameParts),
+        "operation" -> cmd),
       origin = t.origin)
   }
 
   def expectViewNotTableError(
       v: ResolvedTable, cmd: String, mismatchHint: Option[String], t: TreeNode[_]): Throwable = {
-    val hintStr = mismatchHint.map(" " + _).getOrElse("")
+    val suggestion = mismatchHint.map(" " + _).getOrElse("")
     new AnalysisException(
-      errorClass = "_LEGACY_ERROR_TEMP_1015",
+      errorClass = "UNSUPPORTED_TABLE_OPERATION.WITH_SUGGESTION",
       messageParameters = Map(
-        "identifier" -> v.identifier.quoted,
-        "cmd" -> cmd,
-        "hintStr" -> hintStr),
+        "tableName" -> toSQLId(v.identifier.quoted),

Review Comment:
   `toSQLId` should perform quoting instead of `.quoted`? Doesn't it?



##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {
+    "message" : [
+      "Table <tableName> does not support <operation>."
+    ],
+    "subClass" : {
+      "WITHOUT_SUGGESTION" : {
+        "message" : [
+          ""
+        ]
+      },
+      "WITH_SUGGESTION" : {
+        "message" : [
+          "<suggestion>."
+        ]
+      }
+    }
+  },
+  "UNSUPPORTED_TEMP_VIEW_OPERATION" : {
+    "message" : [
+      "Temp view <tempViewName> does not support <operation>."
+    ],
+    "subClass" : {
+      "WITHOUT_SUGGESTION" : {
+        "message" : [
+          ""
+        ]
+      },
+      "WITH_SUGGESTION" : {
+        "message" : [
+          "<suggestion>."
+        ]
+      }
+    }
+  },
   "UNSUPPORTED_TYPED_LITERAL" : {
     "message" : [
       "Literals of the type <unsupportedType> are not supported. Supported types are <supportedTypes>."
     ],
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_VIEW_OPERATION" : {
+    "message" : [
+      "View <viewName> does not support <operation>."

Review Comment:
   ```suggestion
         "The view <viewName> does not support <operation>."
   ```



##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {
+    "message" : [
+      "Table <tableName> does not support <operation>."

Review Comment:
   ```suggestion
         "The table <tableName> does not support <operation>."
   ```



##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {

Review Comment:
   Does this duplicate `UNSUPPORTED_FEATURE.TABLE_OPERATION`?



##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {
+    "message" : [
+      "Table <tableName> does not support <operation>."
+    ],
+    "subClass" : {
+      "WITHOUT_SUGGESTION" : {
+        "message" : [
+          ""
+        ]
+      },
+      "WITH_SUGGESTION" : {
+        "message" : [
+          "<suggestion>."

Review Comment:
   Besides of the hits, how many others exist in the source code?
   ```scala
     private def alterViewTypeMismatchHint: Option[String] = Some("Please use ALTER TABLE instead.")
   
     private def alterTableTypeMismatchHint: Option[String] = Some("Please use ALTER VIEW instead.")
   ```
   
   Can you move the text to `error-classes.json`?



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


[GitHub] [spark] panbingkun commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1315780224


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1134,20 +1134,21 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor
           case v: ResolvedPersistentView =>
             val nameParts = v.catalog.name() +: v.identifier.asMultipartIdentifier
             throw QueryCompilationErrors.expectTableNotViewError(
-              nameParts, isTemp = false, cmd, relationTypeMismatchHint, u)
+              nameParts, isTemp = false, cmd, true, u)

Review Comment:
   Because we put the content of hint in error-classes.json



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


[GitHub] [spark] MaxGekk closed pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]
URL: https://github.com/apache/spark/pull/42109


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


[GitHub] [spark] cloud-fan commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1315349400


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3389,12 +3389,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {
+    "message" : [
+      "The table <tableName> does not support <operation>."
+    ],
+    "subClass" : {
+      "WITHOUT_SUGGESTION" : {
+        "message" : [
+          ""
+        ]
+      },
+      "WITH_SUGGESTION" : {
+        "message" : [
+          "Please use ALTER TABLE instead."
+        ]
+      }
+    }
+  },
+  "UNSUPPORTED_TEMP_VIEW_OPERATION" : {

Review Comment:
   Can we remove this? temp view is also view and there is nothing wrong to say `The view abc does not ...` even if `abc` is a temp view



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


[GitHub] [spark] panbingkun commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1315778389


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/v2ResolutionPlans.scala:
##########
@@ -44,7 +44,7 @@ case class UnresolvedNamespace(multipartIdentifier: Seq[String]) extends Unresol
 case class UnresolvedTable(
     multipartIdentifier: Seq[String],
     commandName: String,
-    relationTypeMismatchHint: Option[String]) extends UnresolvedLeafNode
+    hint: Boolean = false) extends UnresolvedLeafNode

Review Comment:
   Okay, let me refactor it.



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


[GitHub] [spark] panbingkun commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1288316660


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {

Review Comment:
   This is a difficult problem. 
   If we merge `UNSUPPORTED_FEATURE.TABLE_OPERATION` to `UNSUPPORTED_TABLE_OPERATION.WITH_SUGGESTION`, 
   we need to assign a new suitable subclass name for it, because it is different from `UNSUPPORTED_TABLE_OPERATION.WITH_SUGGESTION`'s suggestion information.
   



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


[GitHub] [spark] MaxGekk commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1292122738


##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -3219,12 +3219,63 @@
     },
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_TABLE_OPERATION" : {

Review Comment:
   I see. Let's leave this as you propose in the PR.



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


[GitHub] [spark] cloud-fan commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1315365663


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/v2ResolutionPlans.scala:
##########
@@ -44,7 +44,7 @@ case class UnresolvedNamespace(multipartIdentifier: Seq[String]) extends Unresol
 case class UnresolvedTable(
     multipartIdentifier: Seq[String],
     commandName: String,
-    relationTypeMismatchHint: Option[String]) extends UnresolvedLeafNode
+    hint: Boolean = false) extends UnresolvedLeafNode

Review Comment:
   This is not a good name, as `hint` is too vague. How about `suggestAlterCommand: Boolean`?



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


[GitHub] [spark] cloud-fan commented on a diff in pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #42109:
URL: https://github.com/apache/spark/pull/42109#discussion_r1315365663


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/v2ResolutionPlans.scala:
##########
@@ -44,7 +44,7 @@ case class UnresolvedNamespace(multipartIdentifier: Seq[String]) extends Unresol
 case class UnresolvedTable(
     multipartIdentifier: Seq[String],
     commandName: String,
-    relationTypeMismatchHint: Option[String]) extends UnresolvedLeafNode
+    hint: Boolean = false) extends UnresolvedLeafNode

Review Comment:
   This is not a good name, as `hint` is too vague. How about `suggestAlternative: Boolean`?



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


[GitHub] [spark] panbingkun commented on pull request #42109: [SPARK-44404][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[1009,1010,1013,1015,1016,1278]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on PR #42109:
URL: https://github.com/apache/spark/pull/42109#issuecomment-1653680479

   cc @MaxGekk 


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