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/18 12:54:20 UTC

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

cloud-fan commented on code in PR #36578:
URL: https://github.com/apache/spark/pull/36578#discussion_r875857142


##########
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:
   What will the sql query look like if it's very long?



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