panbingkun commented on code in PR #42917: URL: https://github.com/apache/spark/pull/42917#discussion_r1329665321
########## common/utils/src/main/resources/error/error-classes.json: ########## @@ -860,6 +860,50 @@ "Exceeds char/varchar type length limitation: <limit>." ] }, + "EXPECT_PERMANENT_VIEW_NOT_TEMP" : { + "message" : [ + "'<operation>' expects a permanent view but <viewName> is a temp view." + ] + }, + "EXPECT_TABLE_NOT_VIEW" : { + "message" : [ + "'<operation>' expects a table but <viewName> is a view." + ], + "subClass" : { + "NO_ALTERNATIVE" : { + "message" : [ + "" + ] + }, + "USE_ALTER_VIEW" : { + "message" : [ + "Please use ALTER VIEW instead." + ] + } + } + }, + "EXPECT_TABLE_OR_PERMANENT_VIEW_NOT_TEMP" : { Review Comment: I checked two cases in UT,as follows: - "SHOW CREATE TABLE<viewName> ..." - "ANALYZE TABLE<viewName> ..." throw ` EXPECT_ PERMANENT_ VIEW_ NOT_ TEMP`, It's reasonable. ########## common/utils/src/main/resources/error/error-classes.json: ########## @@ -860,6 +860,50 @@ "Exceeds char/varchar type length limitation: <limit>." ] }, + "EXPECT_PERMANENT_VIEW_NOT_TEMP" : { + "message" : [ + "'<operation>' expects a permanent view but <viewName> is a temp view." + ] + }, + "EXPECT_TABLE_NOT_VIEW" : { + "message" : [ + "'<operation>' expects a table but <viewName> is a view." + ], + "subClass" : { + "NO_ALTERNATIVE" : { + "message" : [ + "" + ] + }, + "USE_ALTER_VIEW" : { + "message" : [ + "Please use ALTER VIEW instead." + ] + } + } + }, + "EXPECT_TABLE_OR_PERMANENT_VIEW_NOT_TEMP" : { Review Comment: I checked two cases in UT,as follows: - "SHOW CREATE TABLE<viewName> ..." - "ANALYZE TABLE<viewName> ..." throw ` EXPECT_ PERMANENT_ VIEW_ NOT_ TEMP`, It's reasonable. -- 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