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 2022/11/16 06:59:05 UTC
[GitHub] [spark] zhengruifeng opened a new pull request, #38670: [SPARK-41157][CONNECT][PYTHON][TEST] Show detailed differences in test
zhengruifeng opened a new pull request, #38670:
URL: https://github.com/apache/spark/pull/38670
### What changes were proposed in this pull request?
use `assert_eq` in `PandasOnSparkTestCase` to compare dataframes
### Why are the changes needed?
show detailed error message
before:
```
Traceback (most recent call last):
File "/home/jenkins/python/pyspark/sql/tests/connect/test_connect_basic.py", line 244, in test_fill_na
self.assertTrue(
AssertionError: False is not true
```
after:
```
AssertionError: DataFrame.iloc[:, 0] (column name="id") are different
DataFrame.iloc[:, 0] (column name="id") values are different (100.0 %)
[index]: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[left]: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[right]: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Left:
id
id int64
dtype: object
Right:
id
id int64
dtype: object
```
### Does this PR introduce _any_ user-facing change?
No, test only
### How was this patch tested?
existing UT
--
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
[GitHub] [spark] amaliujia commented on pull request #38670: [SPARK-41157][CONNECT][PYTHON][TEST] Show detailed differences in dataframe comparison
Posted by GitBox <gi...@apache.org>.
amaliujia commented on PR #38670:
URL: https://github.com/apache/spark/pull/38670#issuecomment-1317578983
LGTM. Really nice way to compare things in test cases!
--
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
[GitHub] [spark] zhengruifeng commented on pull request #38670: [SPARK-41157][CONNECT][PYTHON][TEST] Show detailed differences in dataframe comparison
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #38670:
URL: https://github.com/apache/spark/pull/38670#issuecomment-1316623747
cc @HyukjinKwon @amaliujia `df. equals(df)` is super painful to debug
--
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
[GitHub] [spark] HyukjinKwon commented on pull request #38670: [SPARK-41157][CONNECT][PYTHON][TEST] Show detailed differences in dataframe comparison
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #38670:
URL: https://github.com/apache/spark/pull/38670#issuecomment-1316636035
Merged to master.
--
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
[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #38670: [SPARK-41157][CONNECT][PYTHON][TEST] Show detailed differences in dataframe comparison
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on code in PR #38670:
URL: https://github.com/apache/spark/pull/38670#discussion_r1040504948
##########
python/pyspark/sql/tests/connect/test_connect_basic.py:
##########
@@ -36,11 +36,12 @@
from pyspark.sql.connect.functions import lit
from pyspark.sql.dataframe import DataFrame
from pyspark.testing.connectutils import should_test_connect, connect_requirement_message
+from pyspark.testing.pandasutils import PandasOnSparkTestCase
Review Comment:
Hi, @zhengruifeng . Unfortunately, this seems to introduce a pandas dependency accidentally.
Previously, this file is guarded by `if have_pandas` at line 33.
--
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
[GitHub] [spark] HyukjinKwon closed pull request #38670: [SPARK-41157][CONNECT][PYTHON][TEST] Show detailed differences in dataframe comparison
Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #38670: [SPARK-41157][CONNECT][PYTHON][TEST] Show detailed differences in dataframe comparison
URL: https://github.com/apache/spark/pull/38670
--
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
[GitHub] [spark] zhengruifeng commented on pull request #38670: [SPARK-41157][CONNECT][PYTHON][TEST] Show detailed differences in dataframe comparison
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #38670:
URL: https://github.com/apache/spark/pull/38670#issuecomment-1316638919
thank you @HyukjinKwon
--
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