Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1650#discussion_r157336895
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonFilters.scala
 ---
    @@ -78,9 +78,17 @@ object CarbonFilters {
               Some(new LessThanEqualToExpression(getCarbonExpression(name),
                 getCarbonLiteralExpression(name, value)))
             case sources.In(name, values) =>
    -          Some(new InExpression(getCarbonExpression(name),
    -            new ListExpression(
    -              convertToJavaList(values.map(f => 
getCarbonLiteralExpression(name, f)).toList))))
    +          if (values.length == 1 && values(0) == null) {
    +            Some(new InExpression(getCarbonExpression(name),
    +              new ListExpression(
    --- End diff --
    
    1. why two conditions length=1 and others when logic is same. only else 
condition should be sufficient
    2. Not In case when null comes, in method TransformExpression (as sounak 
pointed), the behaviour was similar to falseExpression. So we have to conform 
not IN null case with hive to decide the behaviour.
    3. Please add test cases for In and Not in case with null expression and 
compare behaviour with hive.


---

Reply via email to