Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/20803#discussion_r174677799 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala --- @@ -635,6 +637,7 @@ class SparkSession private( * @since 2.0.0 */ def sql(sqlText: String): DataFrame = { + SQLExecution.setSqlText(substitutor.substitute(sqlText)) --- End diff -- It's better to answer the list first. Strictly speaking, except `collect`, most of the dataframe operations will create another dataframe and execute. e.g. `.count()` creates a new dataframe with aggregate, `.show()` creates a new dataframe with limit. It seems like `df.count` should not show the SQL, but `df.show` should as it's very common.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org