[GitHub] [spark] itholic commented on a diff in pull request #39260: [SPARK-41579][SQL] Assign name to _LEGACY_ERROR_TEMP_1249
itholic commented on code in PR #39260: URL: https://github.com/apache/spark/pull/39260#discussion_r1073551736 ## core/src/main/resources/error/error-classes.json: ## @@ -961,6 +961,11 @@ ], "sqlState" : "42000" }, + "NOT_A_PARTITIONED_TABLE" : { +"message" : [ + "Operation is not allowed for because it is not a partitioned table." Review Comment: Let me handle this when I submit another error message improvement PR. Thanks! -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] [spark] itholic commented on a diff in pull request #39260: [SPARK-41579][SQL] Assign name to _LEGACY_ERROR_TEMP_1249
itholic commented on code in PR #39260: URL: https://github.com/apache/spark/pull/39260#discussion_r1064249717 ## sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala: ## @@ -2166,6 +2166,22 @@ abstract class DDLSuite extends QueryTest with DDLSuiteBase { assert(spark.sessionState.catalog.isRegisteredFunction(rand)) } } + + test("NOT_A_PARTITIONED_TABLE: ALTER TABLE is not allowed for non-partitioned table") { Review Comment: Just moved the test into dedicated test suites, and update the test name. Thanks! -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] [spark] itholic commented on a diff in pull request #39260: [SPARK-41579][SQL] Assign name to _LEGACY_ERROR_TEMP_1249
itholic commented on code in PR #39260: URL: https://github.com/apache/spark/pull/39260#discussion_r1062073949 ## sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala: ## @@ -2405,22 +2405,24 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase { messageParameters = Map.empty) } - def cmdOnlyWorksOnPartitionedTablesError(cmd: String, tableIdentWithDB: String): Throwable = { + def cmdOnlyWorksOnPartitionedTablesError( + operation: String, + tableIdentWithDB: String): Throwable = { new AnalysisException( - errorClass = "_LEGACY_ERROR_TEMP_1249", + errorClass = "NOT_A_PARTITIONED_TABLE", messageParameters = Map( -"cmd" -> cmd, +"operation" -> toSQLStmt(operation), "tableIdentWithDB" -> tableIdentWithDB)) } - def cmdOnlyWorksOnTableWithLocationError(cmd: String, tableIdentWithDB: String): Throwable = { + def cmdOnlyWorksOnTableWithLocationError( Review Comment: Oh... yeah seems like we should introduce new error class. Just turned this error into `_LEGACY_ERROR_TEMP_2446`. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org