diff options
author | Cheng Lian <lian@databricks.com> | 2016-06-22 22:28:54 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-06-22 22:28:54 -0700 |
commit | f34b5c62b2da3fe0ea989acea46fff949d349afc (patch) | |
tree | 0ccc471501b886759e3ac1fdf515009b1414b1db | |
parent | 925884a612dd88beaddf555c74d90856ab040ec7 (diff) | |
download | spark-f34b5c62b2da3fe0ea989acea46fff949d349afc.tar.gz spark-f34b5c62b2da3fe0ea989acea46fff949d349afc.tar.bz2 spark-f34b5c62b2da3fe0ea989acea46fff949d349afc.zip |
[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.
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala index 3eb93a2922..30dc7e81e9 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala @@ -830,7 +830,7 @@ case class ShowCreateTableCommand(table: TableIdentifier) extends RunnableComman 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) { @@ -864,7 +864,7 @@ case class ShowCreateTableCommand(table: TableIdentifier) extends RunnableComman } if (props.nonEmpty) { - builder ++= props.mkString("TBLPROPERTIES (", ",\n ", ")\n") + builder ++= props.mkString("TBLPROPERTIES (\n ", ",\n ", "\n)\n") } } } |