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


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

Review Comment:
   How about such an approach?
   ```json
   "NOT_SUPPORTED_IN_JDBC_CATALOG" : {
     "message" : [
       "Not supported operation in JDBC catalog:"
     ],
     "subClass" : {
       "OPERATION" : {
         "message" : [
           "<cmd>"
         ]
       },
       "OPERATION_WITH_PROPERTY" : {
         "message" : [
           "<cmd> with property <property>."
         ]
       }
     },
     "sqlState" : "46110"
   }
   ```
   (Also I'm not sure if the sql state is the correct one)
   
   And corresponding error messages examples: 
   
   - `[NOT_SUPPORTED_IN_JDBC_CATALOG.OPERATION_WITH_PROPERTY] Not supported 
operation in JDBC catalog: SET NAMESPACE with property "location".`
   - `[NOT_SUPPORTED_IN_JDBC_CATALOG.OPERATION] Not supported operation in JDBC 
catalog: CREATE NAMESPACE ... LOCATION ...`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to