cloud-fan commented on a change in pull request #26734: [SPARK-30099][SQL] 
Improve Analyzed Logical Plan
URL: https://github.com/apache/spark/pull/26734#discussion_r353342979
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
 ##########
 @@ -155,14 +155,15 @@ class QueryExecution(
     append("== Parsed Logical Plan ==\n")
     QueryPlan.append(logical, append, verbose, addSuffix, maxFields)
     append("\n== Analyzed Logical Plan ==\n")
-    val analyzedOutput = try {
-      truncatedString(
-        analyzed.output.map(o => s"${o.name}: ${o.dataType.simpleString}"), ", 
", maxFields)
+    try {
+      append(
+        truncatedString(
+          analyzed.output.map(o => s"${o.name}: ${o.dataType.simpleString}"), 
", ", maxFields)
+      )
+      append("\n")
     } catch {
-      case e: AnalysisException => e.toString
+      case _: AnalysisException =>
 
 Review comment:
   shall we put something to indicate that the output is unknown because plan 
is not resolved?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

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

Reply via email to