sunchao commented on pull request #29565:
URL: https://github.com/apache/spark/pull/29565#issuecomment-683352883
> I wondered how it handles null literal, might want to add a test case like
this:
>
> ```
> test("unwrap casts when literal is null") {
> val intLit = Literal.create(null, IntegerType)
> val shortLit = Literal.create(null, ShortType)
> assertEquivalent('a > intLit, 'a > shortLit)
> assertEquivalent('a >= intLit, 'a >= shortLit)
> assertEquivalent('a === intLit, 'a === shortLit)
> assertEquivalent('a <=> intLit, 'a <=> shortLit)
> assertEquivalent('a <= intLit, 'a <= shortLit)
> assertEquivalent('a < intLit, 'a < shortLit)
> }
> ```
Sure. I can add tests for this. But notice that nulls should have already
been handled by `NullPropagation` though so the binary comparisons should have
been transformed to `null` or something else.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]