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 2019/04/19 16:18:31 UTC
[GitHub] [spark] viirya commented on a change in pull request #24415:
[SPARK-27439][SQL] Use analyzed plan when explaining Dataset
viirya commented on a change in pull request #24415: [SPARK-27439][SQL] Use analyzed plan when explaining Dataset
URL: https://github.com/apache/spark/pull/24415#discussion_r277027250
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -498,7 +498,10 @@ class Dataset[T] private[sql](
* @since 1.6.0
*/
def explain(extended: Boolean): Unit = {
- val explain = ExplainCommand(queryExecution.logical, extended = extended)
+ // Because views are possibly resolved in the analyzed plan of this dataset. We use analyzed
+ // plan in `ExplainCommand`, for consistency. Otherwise, the plans shown by explain command
+ // might be inconsistent with the evaluated data of this dataset.
+ val explain = ExplainCommand(queryExecution.analyzed, extended = extended)
Review comment:
Sure. I originally thought manual test might be enough. Will add one unit test soon.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org