HyukjinKwon commented on a change in pull request #35488:
URL: https://github.com/apache/spark/pull/35488#discussion_r804497038



##########
File path: python/pyspark/pandas/utils.py
##########
@@ -467,11 +467,16 @@ def is_testing() -> bool:
 
 def default_session() -> SparkSession:
     spark = SparkSession.getActiveSession()
-    if spark is not None:
-        return spark
+    if spark is None:
+        spark = SparkSession.builder.appName("pandas-on-Spark").getOrCreate()
+
+    if spark.conf.get("spark.sql.ansi.enabled"):
+        log_advice(
+            "The config 'spark.sql.ansi.enabled' is set to True. This can 
cause the unexpected behavior "
+            "from pandas API on Spark since pandas API on Spark follows the 
behavior of pandas, not SQL."

Review comment:
       @itholic can you fix the linter failure?




-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to