cloud-fan commented on a change in pull request #32563:
URL: https://github.com/apache/spark/pull/32563#discussion_r638081176



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -844,8 +844,13 @@ case class ShowTablesCommand(
         val tableName = tableIdent.table
         val isTemp = catalog.isTempView(tableIdent)
         if (isExtended) {
-          val information = 
catalog.getTempViewOrPermanentTableMetadata(tableIdent).simpleString
-          Row(database, tableName, isTemp, s"$information\n")
+          val information = 
catalog.getTempViewOrPermanentTableMetadata(tableIdent)
+          val value = if 
(conf.getConf(SQLConf.LEGACY_KEEP_COMMAND_OUTPUT_SCHEMA)) {
+            s"$information\n"
+          } else {
+            information.toLinkedHashMap

Review comment:
       The each map value, I think it's better to be a single-line string. 
Shall we update how we turn the schema into string? Currently the schema string 
is multi-lines

##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -844,8 +844,13 @@ case class ShowTablesCommand(
         val tableName = tableIdent.table
         val isTemp = catalog.isTempView(tableIdent)
         if (isExtended) {
-          val information = 
catalog.getTempViewOrPermanentTableMetadata(tableIdent).simpleString
-          Row(database, tableName, isTemp, s"$information\n")
+          val information = 
catalog.getTempViewOrPermanentTableMetadata(tableIdent)
+          val value = if 
(conf.getConf(SQLConf.LEGACY_KEEP_COMMAND_OUTPUT_SCHEMA)) {
+            s"$information\n"
+          } else {
+            information.toLinkedHashMap

Review comment:
       For each map value, I think it's better to be a single-line string. 
Shall we update how we turn the schema into string? Currently the schema string 
is multi-lines




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to