spark git commit: [SQL][MINOR] Fix minor formatting issues in SHOW CREATE TABLE output

2016-06-22 Thread rxin
Repository: spark
Updated Branches:
  refs/heads/branch-2.0 5b4a9a4c3 -> 4ad731ed6


[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 

Closes #13864 from liancheng/show-create-table-format-fix.

(cherry picked from commit f34b5c62b2da3fe0ea989acea46fff949d349afc)
Signed-off-by: Reynold Xin 


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4ad731ed
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4ad731ed
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4ad731ed

Branch: refs/heads/branch-2.0
Commit: 4ad731ed6a963131f05c387c2f9536b56d228090
Parents: 5b4a9a4
Author: Cheng Lian 
Authored: Wed Jun 22 22:28:54 2016 -0700
Committer: Reynold Xin 
Committed: Wed Jun 22 22:29:00 2016 -0700

--
 .../scala/org/apache/spark/sql/execution/command/tables.scala| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/4ad731ed/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
--
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 3eb93a2..30dc7e8 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")
   }
 }
   }


-
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org



spark git commit: [SQL][MINOR] Fix minor formatting issues in SHOW CREATE TABLE output

2016-06-22 Thread rxin
Repository: spark
Updated Branches:
  refs/heads/master 925884a61 -> f34b5c62b


[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 

Closes #13864 from liancheng/show-create-table-format-fix.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f34b5c62
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f34b5c62
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f34b5c62

Branch: refs/heads/master
Commit: f34b5c62b2da3fe0ea989acea46fff949d349afc
Parents: 925884a
Author: Cheng Lian 
Authored: Wed Jun 22 22:28:54 2016 -0700
Committer: Reynold Xin 
Committed: Wed Jun 22 22:28:54 2016 -0700

--
 .../scala/org/apache/spark/sql/execution/command/tables.scala| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/f34b5c62/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
--
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 3eb93a2..30dc7e8 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")
   }
 }
   }


-
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org