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 2023/01/11 01:26:51 UTC
[GitHub] [spark] zhengruifeng commented on a diff in pull request #39491: [SPARK-41887][CONNECT][PYTHON] Make `DataFrame.hint` accept list typed parameter
zhengruifeng commented on code in PR #39491:
URL: https://github.com/apache/spark/pull/39491#discussion_r1066492943
##########
python/pyspark/sql/tests/connect/test_parity_dataframe.py:
##########
@@ -57,13 +57,11 @@ def test_create_nan_decimal_dataframe(self):
def test_duplicated_column_names(self):
super().test_duplicated_column_names()
- # TODO(SPARK-41871): DataFrame hint parameter can be a float
Review Comment:
https://github.com/apache/spark/blob/56f8dccd6532aaebf9f2838be6673d5c75c6df79/python/pyspark/sql/tests/test_dataframe.py#L536-L561
```
plan = df1.join(df2.hint("broadcast"), "id")._jdf.queryExecution().executedPlan()
self.assertEqual(1, plan.toString().count("BroadcastHashJoin"))
```
```
logical_plan = hinted_df._jdf.queryExecution().logical()
self.assertEqual(1, logical_plan.toString().count("1.2345"))
self.assertEqual(1, logical_plan.toString().count("what"))
self.assertEqual(3, logical_plan.toString().count("itworks"))
```
the two tests use `._jdf.queryExecution()` to get the string repr of plan to check the hints, but is not able to do similar check in Connect.
--
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