diff --git a/spark/src/main/scala/io/delta/sql/parser/DeltaSqlParser.scala b/spark/src/main/scala/io/delta/sql/parser/DeltaSqlParser.scala index b06f7aa7af..b6c3611932 100644 --- a/spark/src/main/scala/io/delta/sql/parser/DeltaSqlParser.scala +++ b/spark/src/main/scala/io/delta/sql/parser/DeltaSqlParser.scala @@ -561,7 +561,7 @@ class DeltaSqlAstBuilder extends DeltaSqlBaseBaseVisitor[AnyRef] { } /** - * `ALTER TABLE ALTER COLUMN SYNC IDENTITY` command. + * `ALTER TABLE ... ALTER COLUMN ... SYNC IDENTITY` command. */ override def visitAlterTableSyncIdentity( ctx: AlterTableSyncIdentityContext): LogicalPlan = withOrigin(ctx) { diff --git a/spark/src/test/scala/org/apache/spark/sql/delta/IdentityColumnSyncSuite.scala b/spark/src/test/scala/org/apache/spark/sql/delta/IdentityColumnSyncSuite.scala index 139615f805..9b8c279661 100644 --- a/spark/src/test/scala/org/apache/spark/sql/delta/IdentityColumnSyncSuite.scala +++ b/spark/src/test/scala/org/apache/spark/sql/delta/IdentityColumnSyncSuite.scala @@ -56,7 +56,7 @@ trait IdentityColumnSyncSuiteBase } } - test("alter table sync identity delta") { + test("alter table sync identity on delta table") { val starts = Seq(-1, 1) val steps = Seq(-3, 3) val alterKeywords = Seq("ALTER", "CHANGE") @@ -202,14 +202,14 @@ trait IdentityColumnSyncSuiteBase } } - test("alter table sync identity overflow") { + test("alter table sync identity overflow error") { withSimpleGeneratedByDefaultTable(startsWith = 1L, incrementBy = 10L) { sql(s"INSERT INTO $tblName VALUES (${Long.MaxValue}, 'a')") intercept[ArithmeticException](sql(s"ALTER TABLE $tblName ALTER COLUMN id SYNC IDENTITY")) } } - test("alter table sync identity non delta") { + test("alter table sync identity on non delta table error") { withTable(tblName) { sql( s""" @@ -226,7 +226,7 @@ trait IdentityColumnSyncSuiteBase } } - test("alter table sync identity non identity column") { + test("alter table sync identity on non identity column error") { withTable(tblName) { createTable( tblName,