cloud-fan commented on a change in pull request #31422:
URL: https://github.com/apache/spark/pull/31422#discussion_r568414692
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -3493,14 +3493,16 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef]
with SQLConfHelper with Logg
relationTypeMismatchHint = Some("Please use ALTER TABLE instead.")),
cleanedTableProperties)
} else {
- AlterTableSetPropertiesStatement(
- visitMultipartIdentifier(ctx.multipartIdentifier),
+ AlterTableSetProperties(
+ createUnresolvedTable(
+ ctx.multipartIdentifier,
+ "ALTER TABLE ... SET TBLPROPERTIES"),
Review comment:
let's rebase this PR. `createUnresolvedTable` takes a new parameter now.
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
##########
@@ -167,6 +167,12 @@ abstract class SQLViewSuite extends QueryTest with
SQLTestUtils {
assertAnalysisError(
s"ALTER TABLE $viewName DROP PARTITION (a='4', b='8')",
s"$viewName is a temp view. 'ALTER TABLE ... DROP PARTITION ...'
expects a table")
+ assertAnalysisError(
+ s"ALTER TABLE $viewName SET TBLPROPERTIES ('p' = 'an')",
+ s"$viewName is a temp view. 'ALTER TABLE ... SET TBLPROPERTIES'
expects a table")
+ assertAnalysisError(
Review comment:
cc @MaxGekk we should add tests here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]