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 @@ -1839,19 +1839,6 @@ class DDLParserSuite extends AnalysisTest {
Some(Map("ds" -> "2017-06-10"))))
}

test("SHOW CREATE table") {
comparePlans(
parsePlan("SHOW CREATE TABLE a.b.c"),
ShowCreateTable(
UnresolvedTableOrView(Seq("a", "b", "c"), "SHOW CREATE TABLE", allowTempView = false)))

comparePlans(
parsePlan("SHOW CREATE TABLE a.b.c AS SERDE"),
ShowCreateTable(
UnresolvedTableOrView(Seq("a", "b", "c"), "SHOW CREATE TABLE", allowTempView = false),
asSerde = true))
}

test("CACHE TABLE") {
comparePlans(
parsePlan("CACHE TABLE a.b.c"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ case class ShowCreateTableAsSerdeCommand(
s"Unknown table type is found at showCreateHiveTable: $t")
}

builder ++= s"CREATE$tableTypeString ${table.quotedString}"
builder ++= s"CREATE$tableTypeString ${table.quotedString} "

if (metadata.tableType == VIEW) {
showCreateView(metadata, builder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ case class ShowCreateTableExec(
val props = tableOptions.toSeq.sortBy(_._1).map { case (key, value) =>
s"'${escapeSingleQuotedString(key)}' = '${escapeSingleQuotedString(value)}'"
}
builder ++= "OPTIONS"
builder ++= "OPTIONS "
builder ++= concatByMultiLines(props)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 74
-- Number of queries: 76


-- !query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ SHOW CREATE TABLE view_SPARK_30302 AS SERDE
-- !query schema
struct<createtab_stmt:string>
-- !query output
CREATE VIEW `default`.`view_SPARK_30302`(
CREATE VIEW `default`.`view_SPARK_30302` (
`aaa`,
`bbb`)
AS SELECT a, b FROM tbl
Expand Down Expand Up @@ -335,7 +335,7 @@ SHOW CREATE TABLE view_SPARK_30302 AS SERDE
-- !query schema
struct<createtab_stmt:string>
-- !query output
CREATE VIEW `default`.`view_SPARK_30302`(
CREATE VIEW `default`.`view_SPARK_30302` (
`aaa` COMMENT 'comment with \'quoted text\' for aaa',
`bbb`)
COMMENT 'This is a comment with \'quoted text\' for view'
Expand Down Expand Up @@ -377,7 +377,7 @@ SHOW CREATE TABLE view_SPARK_30302 AS SERDE
-- !query schema
struct<createtab_stmt:string>
-- !query output
CREATE VIEW `default`.`view_SPARK_30302`(
CREATE VIEW `default`.`view_SPARK_30302` (
`aaa`,
`bbb`)
TBLPROPERTIES (
Expand Down

This file was deleted.

Loading