You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/05/17 10:56:43 UTC

[GitHub] [spark] LuciferYang commented on a diff in pull request #36578: [SPARK-39207][SQL] Record the SQL text when executing a query using SparkSession.sql()

LuciferYang commented on code in PR #36578:
URL: https://github.com/apache/spark/pull/36578#discussion_r874671414


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala:
##########
@@ -82,7 +82,7 @@ object SQLExecution {
           val redactedStr = Utils
             .redact(sparkSession.sessionState.conf.stringRedactionPattern, sqlStr)
           redactedStr.substring(0, Math.min(truncateLength, redactedStr.length))
-        }.getOrElse(callSite.shortForm)
+        }.orElse(queryExecution.sqlText).getOrElse(callSite.shortForm)

Review Comment:
   Maybe we can add some rendering mechanism to define the style of `sqlText`



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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