Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix failing tests
- remove 'replace columns' unsupported test
- fix 'add columns' unsupported operations tests to match refactored exceptions messages
  • Loading branch information
manu-olx committed Jun 4, 2019
commit 01ce36cda69b2722cddb6a108b8683baa3584394
Original file line number Diff line number Diff line change
Expand Up @@ -840,14 +840,6 @@ class DDLParserSuite extends AnalysisTest with SharedSQLContext {
assertUnsupported("ALTER TABLE table_name SKEWED BY (key) ON (1,5,6) STORED AS DIRECTORIES")
}

test("alter table: replace columns (not allowed)") {
assertUnsupported(
"""
|ALTER TABLE table_name REPLACE COLUMNS (new_col1 INT
|COMMENT 'test_comment', new_col2 LONG COMMENT 'test_comment2') RESTRICT
""".stripMargin)
}

test("show databases") {
val sql1 = "SHOW DATABASES"
val sql2 = "SHOW DATABASES LIKE 'defau*'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2589,7 +2589,7 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
val e = intercept[AnalysisException] {
sql("ALTER TABLE t1 ADD COLUMNS (c2 int)")
}.getMessage
assert(e.contains("ALTER ADD COLUMNS does not support datasource table with type"))
assert(e.contains("ALTER [ADD|REPLACE] COLUMNS do not support datasource table with type"))
}
}

Expand All @@ -2599,7 +2599,7 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
val e = intercept[AnalysisException] {
sql("ALTER TABLE tmp_v ADD COLUMNS (c3 INT)")
}
assert(e.message.contains("ALTER ADD COLUMNS does not support views"))
assert(e.message.contains("ALTER [ADD|REPLACE] COLUMNS do not support views"))
}
}

Expand All @@ -2609,7 +2609,7 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
val e = intercept[AnalysisException] {
sql("ALTER TABLE v1 ADD COLUMNS (c3 INT)")
}
assert(e.message.contains("ALTER ADD COLUMNS does not support views"))
assert(e.message.contains("ALTER [ADD|REPLACE] COLUMNS do not support views"))
}
}

Expand Down