Skip to content
Snippets Groups Projects
Commit f34b5c62 authored by Cheng Lian's avatar Cheng Lian Committed by Reynold Xin
Browse files

[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.
parent 925884a6
No related branches found
No related tags found
No related merge requests found
......@@ -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")
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment