[GitHub] spark pull request #20248: [SPARK-23058][SQL] Show non printable field delim...

2018-07-17 Thread wangyum
Github user wangyum closed the pull request at:

https://github.com/apache/spark/pull/20248


---

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



[GitHub] spark pull request #20248: [SPARK-23058][SQL] Show non printable field delim...

2018-01-13 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/20248#discussion_r161374594
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -1023,7 +1023,12 @@ case class ShowCreateTableCommand(table: 
TableIdentifier) extends RunnableComman
 
   val serdeProps = metadata.storage.properties.map {
 case (key, value) =>
-  s"'${escapeSingleQuotedString(key)}' = 
'${escapeSingleQuotedString(value)}'"
+  val escapedValue = if (value.length == 1 && (value.head < 32 || 
value.head > 126)) {
--- End diff --

I see, so when the same properties are specified, they can be specified as 
an octal escape sequence. That makes sense to render it back that way. I'd 
still use `isISOControl` for better generality.


---

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



[GitHub] spark pull request #20248: [SPARK-23058][SQL] Show non printable field delim...

2018-01-12 Thread wangyum
Github user wangyum commented on a diff in the pull request:

https://github.com/apache/spark/pull/20248#discussion_r161364269
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -1023,7 +1023,12 @@ case class ShowCreateTableCommand(table: 
TableIdentifier) extends RunnableComman
 
   val serdeProps = metadata.storage.properties.map {
 case (key, value) =>
-  s"'${escapeSingleQuotedString(key)}' = 
'${escapeSingleQuotedString(value)}'"
+  val escapedValue = if (value.length == 1 && (value.head < 32 || 
value.head > 126)) {
--- End diff --

I need to copy an external table to another environment, but lost the 
create table statement.  So I want to get this create table statement by `show 
create table ...`, but it can't show non printable field delim.


---

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