Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16193#discussion_r91250161
  
    --- Diff: python/pyspark/sql/tests.py ---
    @@ -360,6 +360,15 @@ def test_broadcast_in_udf(self):
             [res] = self.spark.sql("SELECT MYUDF('')").collect()
             self.assertEqual("", res[0])
     
    +    def test_udf_with_filter_function(self):
    +        df = self.spark.createDataFrame([(1, "1"), (2, "2"), (1, "2"), (1, 
"2")], ["key", "value"])
    +        from pyspark.sql.functions import udf, col
    +        from pyspark.sql.types import BooleanType
    +
    +        my_filter = udf(lambda a: a < 2, BooleanType())
    +        sel = df.select(col("key"), 
col("value")).filter((my_filter(col("key"))) & (df.value < "2"))
    --- End diff --
    
    does this test fail before this PR?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to