zero323 commented on a change in pull request #30181:
URL: https://github.com/apache/spark/pull/30181#discussion_r514363617
##########
File path: python/pyspark/sql/dataframe.pyi
##########
@@ -86,7 +86,7 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
def withWatermark(
self, eventTime: ColumnOrName, delayThreshold: str
) -> DataFrame: ...
- def hint(self, name: str, *parameters: Any) -> DataFrame: ...
+ def hint(self, name: str, *parameters: Union[str, list, float, int]) ->
DataFrame: ...
Review comment:
We have `pyspark._typing.PrimitiveType` which covers things, that can
have simple 1:1 mapping to JVM (all above + `bool`), so something around these
lines
```python
def hint(self, name: str, *parameters: Union[PrimitiveType,
List[PrimitiveType]]) -> DataFrame: ...
```
might work.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]