[GitHub] [carbondata] qiuchenjian commented on a change in pull request #3172: [CARBONDATA-3341] fixed invalid NULL result in filter query

Posted by GitBox on
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-qiuchenjian-commented-on-a-change-in-pull-request-3172-CARBONDATA-3341-fixed-invaly-tp76694.html

qiuchenjian commented on a change in pull request #3172: [CARBONDATA-3341] fixed invalid NULL result in filter query
URL: https://github.com/apache/carbondata/pull/3172#discussion_r272074872
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java
 ##########
 @@ -261,7 +261,12 @@ public int compareTo(int rowId, byte[] compareValue) {
       // if the compare value is null and the data is also null we can directly return 0
       return 0;
     } else {
-      byte[] chunkData = this.getChunkDataInBytes(rowId);
+      byte[] chunkData;
+      if (nullBitSet != null && nullBitSet.length == 0) {
+        chunkData = nullBitSet;
+      } else {
+        chunkData = this.getChunkDataInBytes(rowId);
+      }
 
 Review comment:
   from line 258 to 269,  does this mean ?
   
   ```
       if (nullBitSet == null) {
         byte[] chunkData = this.getChunkDataInBytes(rowId);
         return ByteUtil.UnsafeComparer.INSTANCE.compareTo(chunkData, compareValue);
       } else {
         return ByteUtil.UnsafeComparer.INSTANCE.compareTo(nullBitSet, compareValue);
       }
   ```

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services