[SQL][MINOR] Fix minor formatting issues in SHOW CREATE TABLE output
## What changes were proposed in this pull request? This PR fixes two minor formatting issues appearing in `SHOW CREATE TABLE` output. Before: ``` CREATE EXTERNAL TABLE ... ... WITH SERDEPROPERTIES ('serialization.format' = '1' ) ... TBLPROPERTIES ('avro.schema.url' = '/tmp/avro/test.avsc', 'transient_lastDdlTime' = '1466638180') ``` After: ``` CREATE EXTERNAL TABLE ... ... WITH SERDEPROPERTIES ( 'serialization.format' = '1' ) ... TBLPROPERTIES ( 'avro.schema.url' = '/tmp/avro/test.avsc', 'transient_lastDdlTime' = '1466638180' ) ``` ## How was this patch tested? Manually tested. Author: Cheng Lian <lian@databricks.com> Closes #13864 from liancheng/show-create-table-format-fix.
This commit is contained in:
parent
925884a612
commit
f34b5c62b2
|
@ -830,7 +830,7 @@ case class ShowCreateTableCommand(table: TableIdentifier) extends RunnableComman
|
||||||
s"'${escapeSingleQuotedString(key)}' = '${escapeSingleQuotedString(value)}'"
|
s"'${escapeSingleQuotedString(key)}' = '${escapeSingleQuotedString(value)}'"
|
||||||
}
|
}
|
||||||
|
|
||||||
builder ++= serdeProps.mkString("WITH SERDEPROPERTIES (", ",\n ", "\n)\n")
|
builder ++= serdeProps.mkString("WITH SERDEPROPERTIES (\n ", ",\n ", "\n)\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (storage.inputFormat.isDefined || storage.outputFormat.isDefined) {
|
if (storage.inputFormat.isDefined || storage.outputFormat.isDefined) {
|
||||||
|
@ -864,7 +864,7 @@ case class ShowCreateTableCommand(table: TableIdentifier) extends RunnableComman
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.nonEmpty) {
|
if (props.nonEmpty) {
|
||||||
builder ++= props.mkString("TBLPROPERTIES (", ",\n ", ")\n")
|
builder ++= props.mkString("TBLPROPERTIES (\n ", ",\n ", "\n)\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue