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