This is an automated email from the ASF dual-hosted git repository.
ajantha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/carbondata.git
The following commit(s) were added to refs/heads/master by this push:
new 6165901 [Carbondata-3883] Added filtering for the deleted rows for
local dictionary fields
6165901 is described below
commit 6165901032d1acf6a053b395928df9298fd1c2e0
Author: Nitin-Kashyap <[email protected]>
AuthorDate: Tue Jun 30 20:32:24 2020 +0530
[Carbondata-3883] Added filtering for the deleted rows for local dictionary
fields
Why is this PR needed?
In Presto integration when reading records for table with string fields and
local dictionary enabled gives improper result.
What changes were proposed in this PR?
Added a CarbondataColumnVectorWrapper for the dictionary vector for column
for which internally create dictionary vector.
Wrapper is used to filter the deleted records.
Does this PR introduce any user interface change?
No
Is any new testcase added?
No
This closes #3818
---
.../org/apache/carbondata/presto/CarbonColumnVectorWrapper.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbonColumnVectorWrapper.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbonColumnVectorWrapper.java
index c04473e..49e1be0 100644
---
a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbonColumnVectorWrapper.java
+++
b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbonColumnVectorWrapper.java
@@ -28,6 +28,7 @@ import org.apache.carbondata.core.scan.scanner.LazyPageLoader;
public class CarbonColumnVectorWrapper implements CarbonColumnVector {
private CarbonColumnVectorImpl columnVector;
+ private CarbonColumnVectorWrapper dictionaryVectorWrapper;
private boolean[] filteredRows;
@@ -40,6 +41,11 @@ public class CarbonColumnVectorWrapper implements
CarbonColumnVector {
public CarbonColumnVectorWrapper(CarbonColumnVectorImpl columnVector,
boolean[] filteredRows) {
this.columnVector = columnVector;
this.filteredRows = filteredRows;
+
+ if (columnVector.getDictionaryVector() != null) {
+ dictionaryVectorWrapper = new CarbonColumnVectorWrapper(
+ (CarbonColumnVectorImpl)columnVector.getDictionaryVector(),
filteredRows);
+ }
}
@Override
@@ -273,7 +279,7 @@ public class CarbonColumnVectorWrapper implements
CarbonColumnVector {
@Override
public CarbonColumnVector getDictionaryVector() {
- return this.columnVector.getDictionaryVector();
+ return this.dictionaryVectorWrapper;
}
@Override