Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/248#discussion_r84400383
--- Diff:
integration/spark/src/main/scala/org/apache/carbondata/spark/CarbonFilters.scala
---
@@ -259,29 +259,29 @@ object CarbonFilters {
Some(new NotEqualsExpression(transformExpression(a).get,
transformExpression(l).get))
case Not(In(a: Attribute, list))
- if !list.exists(!_.isInstanceOf[Literal]) =>
- if (list.exists(x => (isNullLiteral(x.asInstanceOf[Literal])))) {
- Some(new FalseExpression(transformExpression(a).get))
- }
- else {
- Some(new NotInExpression(transformExpression(a).get,
+ if !list.exists(!_.isInstanceOf[Literal]) =>
+ if (list.exists(x => isNullLiteral(x.asInstanceOf[Literal]))) {
+ Some(new FalseExpression(transformExpression(a).get))
+ }
+ else {
+ Some(new NotInExpression(transformExpression(a).get,
new
ListExpression(convertToJavaList(list.map(transformExpression(_).get)))))
- }
+ }
case In(a: Attribute, list) if
!list.exists(!_.isInstanceOf[Literal]) =>
Some(new InExpression(transformExpression(a).get,
new
ListExpression(convertToJavaList(list.map(transformExpression(_).get)))))
case Not(In(Cast(a: Attribute, _), list))
if !list.exists(!_.isInstanceOf[Literal]) =>
- /* if any illogical expression comes in NOT IN Filter like
- NOT IN('scala',NULL) this will be treated as false expression and
will
- always return no result. */
- if (list.exists(x => (isNullLiteral(x.asInstanceOf[Literal])))) {
- Some(new FalseExpression(transformExpression(a).get))
- }
- else {
- Some(new NotInExpression(transformExpression(a).get, new
ListExpression(
+ /* if any illogical expression comes in NOT IN Filter like
+ NOT IN('scala',NULL) this will be treated as false expression
and will
+ always return no result. */
+ if (list.exists(x => isNullLiteral(x.asInstanceOf[Literal]))) {
+ Some(new FalseExpression(transformExpression(a).get))
+ }
+ else {
--- End diff --
put to previous line
---
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.
---