GitHub user dilipbiswal opened a pull request:
https://github.com/apache/spark/pull/8983
[SPARK-8654][SQL] Fix Analysis exception when using NULL IN (...)
In the analysis phase , while processing the rules for IN predicate, we
compare the in-list types to the lhs expression type and generate
cast operation if necessary. In the case of NULL [NOT] IN expr1 , we end up
generating cast between in list types to NULL like cast (1 as NULL) which
is not a valid cast.
The fix is to not generate such a cast if the lhs type is a NullType instead
we translate the expression to Literal(Null).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dilipbiswal/spark spark_8654
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/8983.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #8983
----
commit 38f973bb124c63c1caabe14ee6e5cca7b764b15a
Author: Dilip Biswal <[email protected]>
Date: 2015-10-02T23:20:56Z
[SPARK-8654] Analysis exception when using NULL IN (...) : invalid cast
In the analysis phase , while processing the rules for IN predicate, we
compare the in-list types to the lhs expression type and generate
cast operation if necessary. In the case of NULL [NOT] IN expr1 , we end up
generating cast between in list types to NULL like cast (1 as NULL) which
is not a valid cast.
The fix is to not generate such a cast if the lhs type is a NullType instead
we translate the expression to Literal(Null).
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]