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 2021/09/29 22:49:48 UTC

[GitHub] [spark] xinrong-databricks commented on a change in pull request #34130: [SPARK-36880][PYTHON] Inline type hints for python/pyspark/sql/functions.py

xinrong-databricks commented on a change in pull request #34130:
URL: https://github.com/apache/spark/pull/34130#discussion_r718936626



##########
File path: python/pyspark/sql/functions.py
##########
@@ -2770,11 +2870,16 @@ def instr(str, substr):
     >>> df.select(instr(df.s, 'b').alias('s')).collect()
     [Row(s=2)]
     """
-    sc = SparkContext._active_spark_context
+    sc = SparkContext._active_spark_context  # type: ignore[attr-defined]
     return Column(sc._jvm.functions.instr(_to_java_column(str), substr))
 
 
-def overlay(src, replace, pos, len=-1):
+def overlay(
+    src: "ColumnOrName",
+    replace: "ColumnOrName",
+    pos: Union[Column, int],
+    len: Union[Column, int] = 1,

Review comment:
       Thanks for catching that!




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