You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by gv...@apache.org on 2017/04/15 16:52:58 UTC
[1/2] incubator-carbondata git commit: fixed variable length filter
query with empty data
Repository: incubator-carbondata
Updated Branches:
refs/heads/master c73e02f20 -> a8ed450bf
fixed variable length filter query with empty data
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/0729379a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/0729379a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/0729379a
Branch: refs/heads/master
Commit: 0729379a43d72d0e2abd2e15ab3ad5d224faedc6
Parents: c73e02f
Author: vpp9380 <vp...@gmail.com>
Authored: Sat Apr 15 17:01:48 2017 +0530
Committer: Venkata Ramana G <ra...@huawei.com>
Committed: Sat Apr 15 22:18:42 2017 +0530
----------------------------------------------------------------------
.../UnsafeVariableLengthDimesionDataChunkStore.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0729379a/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimesionDataChunkStore.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimesionDataChunkStore.java b/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimesionDataChunkStore.java
index f5222fe..2b84449 100644
--- a/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimesionDataChunkStore.java
+++ b/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeVariableLengthDimesionDataChunkStore.java
@@ -171,7 +171,7 @@ public class UnsafeVariableLengthDimesionDataChunkStore
/**
* to compare the two byte array
*
- * @param index index of first byte array
+ * @param index index of first byte array
* @param compareValue value of to be compared
* @return compare result
*/
@@ -199,20 +199,20 @@ public class UnsafeVariableLengthDimesionDataChunkStore
}
// as this class handles this variable length data, so filter value can be
// smaller or bigger than than actual data, so we need to take the smaller length
- int compareResult = 0;
- int compareLength = length < compareValue.length ? length : compareValue.length;
+ int compareResult;
+ int compareLength = Math.min(length , compareValue.length);
for (int i = 0; i < compareLength; i++) {
compareResult = (CarbonUnsafe.unsafe.getByte(dataPageMemoryBlock.getBaseObject(),
dataPageMemoryBlock.getBaseOffset() + currentDataOffset) & 0xff) - (compareValue[i]
& 0xff);
// if compare result is not equal we can break
if (compareResult != 0) {
- break;
+ return compareResult;
}
// increment the offset by one as comparison is done byte by byte
currentDataOffset++;
}
- return compareResult;
+ return length - compareValue.length;
}
}
[2/2] incubator-carbondata git commit: [CARBONDATA-932] Fixed
variable length filter query with empty data. This closes #804
Posted by gv...@apache.org.
[CARBONDATA-932] Fixed variable length filter query with empty data. This closes #804
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/a8ed450b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/a8ed450b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/a8ed450b
Branch: refs/heads/master
Commit: a8ed450bf1546dd69891c26de4661e18008ac11c
Parents: c73e02f 0729379
Author: Venkata Ramana G <ra...@huawei.com>
Authored: Sat Apr 15 22:22:40 2017 +0530
Committer: Venkata Ramana G <ra...@huawei.com>
Committed: Sat Apr 15 22:22:40 2017 +0530
----------------------------------------------------------------------
.../UnsafeVariableLengthDimesionDataChunkStore.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------