Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -3776,7 +3776,7 @@ class AstBuilder extends SqlBaseParserBaseVisitor[AnyRef] with SQLConfHelper wit
val provider = Option(ctx.tableProvider).map(_.multipartIdentifier.getText)

if (provider.isDefined && serdeInfo.isDefined) {
operationNotAllowed(s"CREATE TABLE ... USING ... ${serdeInfo.get.describe}", ctx)
operationNotAllowed(s"REPLACE TABLE ... USING ... ${serdeInfo.get.describe}", ctx)
}

val partitioning =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,10 @@ class DDLParserSuite extends AnalysisTest {
|USING parquet
|STORED AS parquet
""".stripMargin
assertUnsupported(createSql, Seq("CREATE TABLE ... USING ... STORED AS"))

val replaceSql = createSql.replaceFirst("CREATE", "REPLACE")
Seq(createSql, replaceSql).foreach { sql =>
assertUnsupported(sql, Seq("CREATE TABLE ... USING ... STORED AS"))
}
assertUnsupported(replaceSql, Seq("REPLACE TABLE ... USING ... STORED AS"))
}

test("create/replace table - using with row format serde") {
Expand All @@ -513,10 +513,10 @@ class DDLParserSuite extends AnalysisTest {
|USING parquet
|ROW FORMAT SERDE 'customSerde'
""".stripMargin
assertUnsupported(createSql, Seq("CREATE TABLE ... USING ... ROW FORMAT SERDE"))

val replaceSql = createSql.replaceFirst("CREATE", "REPLACE")
Seq(createSql, replaceSql).foreach { sql =>
assertUnsupported(sql, Seq("CREATE TABLE ... USING ... ROW FORMAT SERDE"))
}
assertUnsupported(replaceSql, Seq("REPLACE TABLE ... USING ... ROW FORMAT SERDE"))
}

test("create/replace table - using with row format delimited") {
Expand All @@ -525,10 +525,10 @@ class DDLParserSuite extends AnalysisTest {
|USING parquet
|ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
""".stripMargin
assertUnsupported(createSql, Seq("CREATE TABLE ... USING ... ROW FORMAT DELIMITED"))

val replaceSql = createSql.replaceFirst("CREATE", "REPLACE")
Seq(createSql, replaceSql).foreach { sql =>
assertUnsupported(sql, Seq("CREATE TABLE ... USING ... ROW FORMAT DELIMITED"))
}
assertUnsupported(replaceSql, Seq("REPLACE TABLE ... USING ... ROW FORMAT DELIMITED"))
}

test("create/replace table - stored by") {
Expand Down