mihailom-db commented on code in PR #51090:
URL: https://github.com/apache/spark/pull/51090#discussion_r2134715061


##########
python/pyspark/pandas/correlation.py:
##########
@@ -219,6 +224,43 @@ def compute(sdf: SparkDataFrame, groupKeys: List[str], 
method: str) -> SparkData
             F.col(CORRELATION_VALUE_2_COLUMN) == 
F.col(CORRELATION_VALUE_Y_COLUMN)
         )
 
+        spark_session = SparkSession.getActiveSession()
+        if is_ansi_mode_enabled(spark_session):

Review Comment:
   Do we really need the separate implementation? `try_divide` is basically `/` 
with ANSI OFF. I would say we can just replace implementations with try_* 
functions here.



-- 
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]

Reply via email to