cloud-fan commented on a change in pull request #26778: [SPARK-30148][SQL]
Optimize writing plans if there is an analysis exception
URL: https://github.com/apache/spark/pull/26778#discussion_r354773940
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
##########
@@ -144,13 +145,21 @@ class QueryExecution(
)
append("\n")
} catch {
- case _: AnalysisException =>
+ case e: AnalysisException => analysisException = e.toString
+ }
+ if (analysisException.size > 0) {
+ QueryPlan.append(analyzed, append, verbose, addSuffix, maxFields)
+ append("\n== Optimized Logical Plan ==\n")
+ QueryPlan.append(optimizedPlan, append, verbose, addSuffix, maxFields)
Review comment:
can we just move them into the try-catch?
----------------------------------------------------------------
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]