You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/01 02:18:30 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #34750: [SPARK-37495][PYTHON] Skip identical index checking of Series.compare when config 'compute.eager_check' is disabled

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



##########
File path: python/pyspark/pandas/series.py
##########
@@ -5847,7 +5866,9 @@ def compare(
                 )
             )
         else:
-            if not self.index.equals(other.index):
+            if get_option("compute.eager_check") and not self.index.equals(other.index):
+                raise ValueError("Can only compare identically-labeled Series objects")
+            elif len(self.index) != len(other.index):

Review comment:
       qq: what happen if we don't compare the length? does it not make sense at all?

##########
File path: python/pyspark/pandas/series.py
##########
@@ -5847,7 +5866,9 @@ def compare(
                 )
             )
         else:
-            if not self.index.equals(other.index):
+            if get_option("compute.eager_check") and not self.index.equals(other.index):
+                raise ValueError("Can only compare identically-labeled Series objects")
+            elif len(self.index) != len(other.index):

Review comment:
       qq: what happen if we don't compare the length? does the output not make sense at all?




-- 
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-unsubscribe@spark.apache.org

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



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