rdblue commented on a change in pull request #24798: [SPARK-27724][SQL]
Implement REPLACE TABLE and REPLACE TABLE AS SELECT with V2
URL: https://github.com/apache/spark/pull/24798#discussion_r291405527
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/DDLParserSuite.scala
##########
@@ -47,82 +47,71 @@ class DDLParserSuite extends AnalysisTest {
comparePlans(parsePlan(sql), expected, checkAnalysis = false)
}
- test("create table using - schema") {
- val sql = "CREATE TABLE my_tab(a INT COMMENT 'test', b STRING) USING
parquet"
-
- parsePlan(sql) match {
- case create: CreateTableStatement =>
- assert(create.tableName == Seq("my_tab"))
- assert(create.tableSchema == new StructType()
- .add("a", IntegerType, nullable = true, "test")
- .add("b", StringType))
- assert(create.partitioning.isEmpty)
- assert(create.bucketSpec.isEmpty)
- assert(create.properties.isEmpty)
- assert(create.provider == "parquet")
- assert(create.options.isEmpty)
- assert(create.location.isEmpty)
- assert(create.comment.isEmpty)
- assert(!create.ifNotExists)
-
- case other =>
- fail(s"Expected to parse
${classOf[CreateTableStatement].getClass.getName} from query," +
- s"got ${other.getClass.getName}: $sql")
+ test("create/replace table using - schema") {
+ val createSql = "CREATE TABLE my_tab(a INT COMMENT 'test', b STRING) USING
parquet"
+ val replaceSql = "CREATE TABLE my_tab(a INT COMMENT 'test', b STRING)
USING parquet"
Review comment:
`REPLACE`?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]