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 2022/01/02 16:17:42 UTC

[GitHub] [spark] zero323 commented on a change in pull request #35071: [SPARK-37788][PYTHON] Update remaining PySpark functions to use ColumnOrName (over Column), where appropriate

zero323 commented on a change in pull request #35071:
URL: https://github.com/apache/spark/pull/35071#discussion_r777229120



##########
File path: python/pyspark/sql/functions.py
##########
@@ -4703,7 +4741,8 @@ def array_repeat(col: "ColumnOrName", count: Union[Column, int]) -> Column:
     assert sc is not None and sc._jvm is not None
     return Column(
         sc._jvm.functions.array_repeat(
-            _to_java_column(col), _to_java_column(count) if isinstance(count, Column) else count
+            _to_java_column(col),
+            count if isinstance(count, int) else _to_java_column(count),

Review comment:
       I'd prefer to either leave this one for the time being, or use the same approach as for the previous PR (`lit`).




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