amanomer 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_r354799120
########## 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) Review comment: If we move this to try-catch (as @cloud-fan suggested), we don't need if-else. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org