Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/14164#discussion_r71965649 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala --- @@ -110,6 +110,28 @@ class DataFrameSuite extends QueryTest with SharedSQLContext { ) } + test("test filtering with predicates on UDT columns") { + val rowRDD = sparkContext.parallelize(Seq(Row(new ExampleMoney(1.0)), Row(new ExampleMoney(2.0)), Row(new ExampleMoney(3.0)))) + val schema = StructType(Array(StructField("dollar", new ExampleMoneyUDT(), false))) + val df = spark.createDataFrame(rowRDD, schema) + + checkAnswer(df.filter(df("dollar") < 2.0), Seq(Row(new ExampleMoney(1.0)))) --- End diff -- cc @mengxr , is UDT designed to work like this?
--- 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