Github user maropu commented on a diff in the pull request:
    --- Diff: 
    @@ -354,6 +354,14 @@ object TypeCoercion {
             p.makeCopy(Array(left, Cast(right, TimestampType)))
           case p @ BinaryComparison(left, right)
    +        if left.isInstanceOf[AttributeReference] && 
right.isInstanceOf[Literal] =>
    +        p.makeCopy(Array(left, castExpr(right, left.dataType)))
    --- End diff --
    We need to cover all the same cases, but it seems this fix couldn't do, for 
    scala> spark.udf.register("testUdf", () => "85908509832958239058032")
    scala> sql("select * from values (1) where testUdf() > 1").explain
    == Physical Plan ==
    *Filter (cast(UDF:testUdf() as int) > 1)
    +- LocalTableScan [col1#104]

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to