Yikun commented on a change in pull request #32122:
URL: https://github.com/apache/spark/pull/32122#discussion_r611133213



##########
File path: python/pyspark/sql/catalog.pyi
##########
@@ -53,7 +54,7 @@ class Catalog:
     def dropGlobalTempView(self, viewName: str) -> None: ...
     def registerFunction(
         self, name: str, f: Callable[..., Any], returnType: DataType = ...
-    ) -> None: ...
+    ) -> UserDefinedFunctionLike: ...

Review comment:
       Note for reviewer:
   
https://github.com/apache/spark/blob/0494dc90af48ce7da0625485a4dc6917a244d580/python/pyspark/sql/catalog.py#L257
   
   
https://github.com/apache/spark/blob/ff1fc5ed4b685b4f5f83d5f600b24f089dd4522e/python/pyspark/sql/udf.pyi#L46-L51

##########
File path: python/pyspark/sql/column.pyi
##########
@@ -109,7 +109,7 @@ class Column:
         self,
         lowerBound: Union[Column, LiteralType, DateTimeLiteral, 
DecimalLiteral],
         upperBound: Union[Column, LiteralType, DateTimeLiteral, 
DecimalLiteral],
-    ) -> Column: ...
+    ) -> bool: ...

Review comment:
       Note for reviewer:
   
https://github.com/apache/spark/blob/ff1fc5ed4b685b4f5f83d5f600b24f089dd4522e/python/pyspark/sql/column.py#L801

##########
File path: python/pyspark/sql/context.pyi
##########
@@ -63,7 +64,7 @@ class SQLContext:
     ) -> DataFrame: ...
     def registerFunction(
         self, name: str, f: Callable[..., Any], returnType: DataType = ...
-    ) -> None: ...
+    ) -> UserDefinedFunctionLike: ...

Review comment:
       Note for reviewer:
   
https://github.com/apache/spark/blob/ff1fc5ed4b685b4f5f83d5f600b24f089dd4522e/python/pyspark/sql/context.py#L236
   
https://github.com/apache/spark/blob/ff1fc5ed4b685b4f5f83d5f600b24f089dd4522e/python/pyspark/sql/udf.pyi#L46-L51

##########
File path: python/pyspark/sql/functions.pyi
##########
@@ -57,7 +57,7 @@ def monotonically_increasing_id() -> Column: ...
 def nanvl(col1: ColumnOrName, col2: ColumnOrName) -> Column: ...
 def percentile_approx(
     col: ColumnOrName,
-    percentage: Union[Column, float, List[float]],
+    percentage: Union[Column, float, List[float], tuple[float]],

Review comment:
       Note for reviewer:
   
https://github.com/apache/spark/blob/ff1fc5ed4b685b4f5f83d5f600b24f089dd4522e/python/pyspark/sql/functions.py#L1218

##########
File path: python/pyspark/sql/conf.pyi
##########
@@ -21,7 +21,7 @@ from py4j.java_gateway import JavaObject  # type: 
ignore[import]
 
 class RuntimeConfig:
     def __init__(self, jconf: JavaObject) -> None: ...
-    def set(self, key: str, value: str) -> str: ...
+    def set(self, key: str, value: str) -> None: ...

Review comment:
       
https://github.com/apache/spark/blob/ff1fc5ed4b685b4f5f83d5f600b24f089dd4522e/python/pyspark/sql/conf.py#L34-L36

##########
File path: python/pyspark/sql/dataframe.pyi
##########
@@ -85,7 +85,7 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
     def checkpoint(self, eager: bool = ...) -> DataFrame: ...
     def localCheckpoint(self, eager: bool = ...) -> DataFrame: ...
     def withWatermark(
-        self, eventTime: ColumnOrName, delayThreshold: str
+        self, eventTime: str, delayThreshold: str

Review comment:
       
https://github.com/apache/spark/blob/ff1fc5ed4b685b4f5f83d5f600b24f089dd4522e/python/pyspark/sql/dataframe.py#L608-L609




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

Reply via email to