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

gaogaotiantian pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.x by this push:
     new c0721052ce87 [SPARK-57021][CONNECT][PYTHON][TEST][FOLLOWUP] Use 
sql.SQLContext explicitly for classic SQLContext tests
c0721052ce87 is described below

commit c0721052ce87f7af5d5cb53d911eda27924d5050
Author: Tian Gao <[email protected]>
AuthorDate: Mon Jun 22 12:00:21 2026 -0700

    [SPARK-57021][CONNECT][PYTHON][TEST][FOLLOWUP] Use sql.SQLContext 
explicitly for classic SQLContext tests
    
    ### What changes were proposed in this pull request?
    
    import `SQLContext` explicitly from `pyspark.sql` instead of from `pyspark` 
because `pyspark.SQLContext` does not exist for connect mode.
    
    ### Why are the changes needed?
    
    connect-only runs are failing.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Test only change.
    
    ### How was this patch tested?
    
    CI.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #56601 from gaogaotiantian/fix-sqlcontext-test.
    
    Authored-by: Tian Gao <[email protected]>
    Signed-off-by: Tian Gao <[email protected]>
    (cherry picked from commit acb7de23202bd69d305861c9b703479f7cb9b8dc)
    Signed-off-by: Tian Gao <[email protected]>
---
 python/pyspark/sql/tests/test_sql_context.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/python/pyspark/sql/tests/test_sql_context.py 
b/python/pyspark/sql/tests/test_sql_context.py
index 73a66eb399f5..e67d28c74958 100644
--- a/python/pyspark/sql/tests/test_sql_context.py
+++ b/python/pyspark/sql/tests/test_sql_context.py
@@ -18,8 +18,7 @@ import os
 import tempfile
 import warnings
 
-from pyspark import SQLContext
-from pyspark.sql import SparkSession
+from pyspark.sql import SparkSession, SQLContext
 from pyspark.testing.sqlutils import ReusedSQLTestCase
 
 


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

Reply via email to