You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "asl3 (via GitHub)" <gi...@apache.org> on 2023/07/17 00:47:21 UTC

[GitHub] [spark] asl3 opened a new pull request, #42027: [SPARK-44413][PYTHON] Clarify error for unsupported arg data type in …

asl3 opened a new pull request, #42027:
URL: https://github.com/apache/spark/pull/42027

   ### What changes were proposed in this pull request?
   This PR adds an error class, `INVALID_TYPE_DF_EQUALITY_ARG`, to clarify the error message for unsupported argument data types when calling `assertDataFrameEqual`.
   
   ### Why are the changes needed?
   The fix helps clarify why an error is thrown and what is wrong when a user passes unsupported arg types into the `assertDataFrameEqual` util function.
   
   ### Does this PR introduce any user-facing change?
   Yes, the PR modifies error message seen by users.
   
   ### How was this patch tested?
   Modified tests in `runtime/python/pyspark/sql/tests/test_utils.py` and `runtime/python/pyspark/sql/tests/connect/test_utils.py`


-- 
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] allisonwang-db commented on a diff in pull request #42027: [SPARK-44413][PYTHON] Clarify error for unsupported arg data type in …

Posted by "allisonwang-db (via GitHub)" <gi...@apache.org>.
allisonwang-db commented on code in PR #42027:
URL: https://github.com/apache/spark/pull/42027#discussion_r1265949390


##########
python/pyspark/sql/tests/test_utils.py:
##########
@@ -648,17 +649,25 @@ def test_assert_error_pandas_df(self):
 
         self.check_error(
             exception=pe.exception,
-            error_class="UNSUPPORTED_DATA_TYPE",
-            message_parameters={"data_type": pd.DataFrame},
+            error_class="INVALID_TYPE_DF_EQUALITY_ARG",
+            message_parameters={
+                "expected_type": DataFrame,
+                "arg_name": "df",
+                "actual_type": pd.DataFrame,

Review Comment:
   Just curious, what will the error message look like in this case? Is it clear that the method expects a pyspark dataframe instead of a pandas dataframe?



-- 
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 #42027: [SPARK-44413][PYTHON] Clarify error for unsupported arg data type in assertDataFrameEqual

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #42027: [SPARK-44413][PYTHON] Clarify error for unsupported arg data type in assertDataFrameEqual
URL: https://github.com/apache/spark/pull/42027


-- 
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 #42027: [SPARK-44413][PYTHON] Clarify error for unsupported arg data type in assertDataFrameEqual

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #42027:
URL: https://github.com/apache/spark/pull/42027#issuecomment-1639048481

   Merged to master and branch-3.5.


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