HyukjinKwon commented on a change in pull request #26435: [SPARK-29821][SQL] 
Allow calling non-aggregate SQL functions with column name
URL: https://github.com/apache/spark/pull/26435#discussion_r344530892
 
 

 ##########
 File path: python/pyspark/sql/functions.py
 ##########
 @@ -513,6 +513,8 @@ def isnan(col):
     [Row(r1=False, r2=False), Row(r1=True, r2=True)]
     """
     sc = SparkContext._active_spark_context
+    if type(col) is str:
+        return Column(sc._jvm.functions.isnan(col))
 
 Review comment:
   Can you add a doctest?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to