You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by we...@apache.org on 2020/10/28 13:24:51 UTC

[spark] branch branch-3.0 updated: [SPARK-33208][SQL] Update the document of SparkSession#sql

This is an automated email from the ASF dual-hosted git repository.

wenchen pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new f6c72e6  [SPARK-33208][SQL] Update the document of SparkSession#sql
f6c72e6 is described below

commit f6c72e6f0f1edeadd41f8e3825e2dcb1996aa433
Author: zky.zhoukeyong <zk...@alibaba-inc.com>
AuthorDate: Wed Oct 28 13:17:28 2020 +0000

    [SPARK-33208][SQL] Update the document of SparkSession#sql
    
    Change-Id: I82db1f9e8f667573aa3a03e05152cbed0ea7686b
    
    ### What changes were proposed in this pull request?
    Update the document of SparkSession#sql, mention that this API eagerly runs DDL/DML commands, but not for SELECT queries.
    
    ### Why are the changes needed?
    To clarify the behavior of SparkSession#sql.
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    No needed.
    
    Closes #30168 from waitinfuture/master.
    
    Authored-by: zky.zhoukeyong <zk...@alibaba-inc.com>
    Signed-off-by: Wenchen Fan <we...@databricks.com>
    (cherry picked from commit b26ae98407c6c017a4061c0c420f48685ddd6163)
    Signed-off-by: Wenchen Fan <we...@databricks.com>
---
 sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala   | 4 ++--
 sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
index 68ce82d..7cf0b6b 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
@@ -641,8 +641,8 @@ class SQLContext private[sql](val sparkSession: SparkSession)
   }
 
   /**
-   * Executes a SQL query using Spark, returning the result as a `DataFrame`. The dialect that is
-   * used for SQL parsing can be configured with 'spark.sql.dialect'.
+   * Executes a SQL query using Spark, returning the result as a `DataFrame`.
+   * This API eagerly runs DDL/DML commands, but not for SELECT queries.
    *
    * @group basic
    * @since 1.3.0
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala b/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
index fc94127..f89e58c 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
@@ -595,7 +595,7 @@ class SparkSession private(
 
   /**
    * Executes a SQL query using Spark, returning the result as a `DataFrame`.
-   * The dialect that is used for SQL parsing can be configured with 'spark.sql.dialect'.
+   * This API eagerly runs DDL/DML commands, but not for SELECT queries.
    *
    * @since 2.0.0
    */


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org