HyukjinKwon commented on code in PR #43651:
URL: https://github.com/apache/spark/pull/43651#discussion_r1382306692


##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -585,16 +585,10 @@ class Dataset[T] private[sql](
    * @group basic
    * @since 3.0.0
    */
-  def explain(mode: String): Unit = sparkSession.withActive {
-    // Because temporary views are resolved during analysis when we create a 
Dataset, and
-    // `ExplainCommand` analyzes input query plan and resolves temporary views 
again. Using
-    // `ExplainCommand` here will probably output different query plans, 
compared to the results
-    // of evaluation of the Dataset. So just output QueryExecution's query 
plans here.
-
+  def explain(mode: String): Unit =

Review Comment:
   Hmmm .. can't you just hijack stdout and save it into a string?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to