From 23b1312324a173b75a3dd1564eda6eb32776b857 Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Mon, 16 Dec 2019 21:35:37 +0900 Subject: [PATCH] [SPARK-30200][DOCS][FOLLOW-UP] Add documentation for explain(mode: String) ### What changes were proposed in this pull request? This PR adds the documentation of the new `mode` added to `Dataset.explain`. ### Why are the changes needed? To let users know the new modes. ### Does this PR introduce any user-facing change? No (doc-only change). ### How was this patch tested? Manually built the doc: ![Screen Shot 2019-12-16 at 3 34 28 PM](https://user-images.githubusercontent.com/6477701/70884617-d64f1680-2019-11ea-9336-247ade7f8768.png) Closes #26903 from HyukjinKwon/SPARK-30200-doc. Authored-by: HyukjinKwon Signed-off-by: HyukjinKwon --- .../main/scala/org/apache/spark/sql/Dataset.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala b/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala index 09f7578596..77b3a2c40b 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala @@ -524,6 +524,16 @@ class Dataset[T] private[sql]( /** * Prints the plans (logical and physical) with a format specified by a given explain mode. * + * @param mode specifies the expected output format of plans. + *
    + *
  • `simple` Print only a physical plan.
  • + *
  • `extended`: Print both logical and physical plans.
  • + *
  • `codegen`: Print a physical plan and generated codes if they are + * available.
  • + *
  • `cost`: Print a logical plan and statistics if they are available.
  • + *
  • `formatted`: Split explain output into two sections: a physical plan outline + * and node details.
  • + *
* @group basic * @since 3.0.0 */ @@ -541,6 +551,8 @@ class Dataset[T] private[sql]( /** * Prints the plans (logical and physical) to the console for debugging purposes. * + * @param extended default `false`. If `false`, prints only the physical plan. + * * @group basic * @since 1.6.0 */