Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhipengmao-db committed Jul 31, 2024
1 parent 0b0500e commit 6d5f460
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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"""
Expand All @@ -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,
Expand Down

0 comments on commit 6d5f460

Please sign in to comment.