BryanCutler commented on a change in pull request #24306: 
[SPARK-27387][PYTHON][TESTS] Replace sqlutils.assertPandasEqual with Pandas 
assert_frame_equals 
URL: https://github.com/apache/spark/pull/24306#discussion_r273589555
 
 

 ##########
 File path: python/pyspark/sql/tests/test_pandas_udf_grouped_map.py
 ##########
 @@ -29,6 +29,25 @@
     pandas_requirement_message, pyarrow_requirement_message
 from pyspark.testing.utils import QuietTest
 
+if have_pandas:
+    import pandas as pd
+    from pandas.util.testing import assert_frame_equal as pd_assert_frame_equal
+
+if have_pyarrow:
+    import pyarrow as pa
+
+
+def assert_frame_equal(left, right):
 
 Review comment:
   This would fail if you don't have pandas with an error that it doesn't know 
what `pd_assert_frame_equal` is, since it's only imported above, conditional on 
pandas being imported already. This is only seen by this file and wouldn't 
change anything elsewhere.
   
   I'm going to remove this though, and only define `check_column_type` here. 
That should make it clearer I think.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to