[CARBONDATA-4286] Fixed measure comparator
authornihal0107 <nihalnitn97@gmail.com>
Wed, 15 Sep 2021 15:36:25 +0000 (21:06 +0530)
committerakashrn5 <akashnilugal@gmail.com>
Thu, 16 Sep 2021 10:07:03 +0000 (15:37 +0530)
commit2d1907b912e0d9923e0a8fcae5f3dddc98fe5134
treefded5212821ba476399c4b741206193989f8b1c3
parent3b29bcb1057166c85e05b67a061ec616e809831d
[CARBONDATA-4286] Fixed measure comparator

Why is this PR needed?
Select query on a table with and filter condition returns an empty result
while valid data present in the table.

Root cause: Currently when we are building the min-max index at block level,
that time we are using unsafe byte comparator for either dimension or measure
column which returns incorrect result for measure columns.

What changes were proposed in this PR?
We should use different comparators for dimensions and measure columns which
we are already doing at time of writing the min-max index at blocklet level.

Does this PR introduce any user interface change?
No

Is any new testcase added?
No

This closes #4217
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockIndex.java
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletIndex.java
core/src/main/java/org/apache/carbondata/core/segmentmeta/SegmentMetaDataInfoStats.java
core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java
core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java
core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverterV3.java
core/src/test/java/org/apache/carbondata/core/util/CarbonMetadataUtilTest.java
processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java