Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/10#discussion_r69290954
--- Diff:
core/src/main/java/org/carbondata/scan/filter/executer/ExcludeFilterExecuterImpl.java
---
@@ -166,34 +166,20 @@ private BitSet setFilterdIndexToBitSetWithColumnIndex(
private BitSet setFilterdIndexToBitSet(FixedLengthDimensionDataChunk
dimColumnDataChunk,
int numerOfRows) {
BitSet bitSet = new BitSet(numerOfRows);
- int startKey = 0;
- int last = 0;
- bitSet.flip(0, numerOfRows);
- int startIndex = 0;
- byte[][] filterValues = dimColumnExecuterInfo.getFilterKeys();
- for (int k = 0; k < filterValues.length; k++) {
- startKey = CarbonUtil
- .getFirstIndexUsingBinarySearch(dimColumnDataChunk, startIndex,
numerOfRows - 1,
- filterValues[k], false);
- if (startKey < 0) {
- continue;
- }
- bitSet.flip(startKey);
- last = startKey;
- for (int j = startKey + 1; j < numerOfRows; j++) {
- if (ByteUtil.UnsafeComparer.INSTANCE
- .compareTo(dimColumnDataChunk.getCompleteDataChunk(), j *
filterValues[k].length,
- filterValues[k].length, filterValues[k], 0,
filterValues[k].length) == 0) {
- bitSet.flip(j);
- last++;
- } else {
- break;
+ if (dimColumnDataChunk instanceof FixedLengthDimensionDataChunk) {
--- End diff --
No need of `if` condition
---
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.
---