xinrong-meng commented on code in PR #50816:
URL: https://github.com/apache/spark/pull/50816#discussion_r2078493965
##########
python/pyspark/pandas/utils.py:
##########
@@ -476,21 +476,28 @@ def is_testing() -> bool:
return "SPARK_TESTING" in os.environ
-def default_session() -> SparkSession:
+def default_session(*, check_ansi_mode: bool = True) -> SparkSession:
spark = SparkSession.getActiveSession()
if spark is None:
spark = SparkSession.builder.appName("pandas-on-Spark").getOrCreate()
- if (
- not ps.get_option("compute.ansi_mode_support", spark_session=spark)
- and spark.conf.get("spark.sql.ansi.enabled") == "true"
- ):
- log_advice(
- "The config 'spark.sql.ansi.enabled' is set to True. "
- "This can cause unexpected behavior "
- "from pandas API on Spark since pandas API on Spark follows "
- "the behavior of pandas, not SQL."
- )
+ if check_ansi_mode:
+ if (
+ not ps.get_option("compute.ansi_mode_support", spark_session=spark)
Review Comment:
I might be a little confused about “Otherwise, it tries to work based on the
config ‘compute.ansi_mode_support.’” It seems the new config only takes effect
when ‘compute.ansi_mode_support’ is off?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]