Skip to content

Commit

Permalink
Merge de9c868 into b21a6d4
Browse files Browse the repository at this point in the history
  • Loading branch information
dhatchayani committed Oct 24, 2018
2 parents b21a6d4 + de9c868 commit 921ef96
Show file tree
Hide file tree
Showing 4 changed files with 445 additions and 3 deletions.
Expand Up @@ -252,12 +252,17 @@ public int compareTo(int rowId, byte[] compareValue) {
// rowId is the inverted index, but the null bitset is based on actual data
int nullBitSetRowId = rowId;
if (isExplicitSorted()) {
nullBitSetRowId = getInvertedReverseIndex(rowId);
nullBitSetRowId = getInvertedIndex(rowId);
}
byte[] nullBitSet = getNullBitSet(nullBitSetRowId, columnPage.getColumnSpec().getColumnType());
if (nullBitSet != null) {
// if this row is null, return default null represent in byte array
return ByteUtil.UnsafeComparer.INSTANCE.compareTo(nullBitSet, compareValue);
if (ByteUtil.UnsafeComparer.INSTANCE.compareTo(nullBitSet, compareValue) == 0) {
return 0;
} else {
return ByteUtil.UnsafeComparer.INSTANCE
.compareTo(this.getChunkDataInBytes(rowId), compareValue);
}
} else {
byte[] chunkData = this.getChunkDataInBytes(rowId);
return ByteUtil.UnsafeComparer.INSTANCE.compareTo(chunkData, compareValue);
Expand Down
Expand Up @@ -511,7 +511,7 @@ private BitSet setFilterdIndexToBitSetWithColumnIndex(

// Binary Search cannot be done on '@NU#LL$!", so need to check and compare for null on
// matching row.
if (dimensionColumnPage.isNoDicitionaryColumn()) {
if (dimensionColumnPage.isNoDicitionaryColumn() && !dimensionColumnPage.isAdaptiveEncoded()) {
updateForNoDictionaryColumn(startMin, endMax, dimensionColumnPage, bitSet);
}
return bitSet;
Expand Down
@@ -0,0 +1,7 @@
-30000,aaa,-300
0,ddd,0
-20000,bbb,-200
70000,ggg,700
10000,eee,100
-10000,ccc,-100
null,null,null

0 comments on commit 921ef96

Please sign in to comment.