carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [42/50] [abbrv] carbondata git commit: Rectify Vector Buffer Calculation
Date Wed, 05 Jul 2017 00:44:51 GMT
Rectify Vector Buffer Calculation


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/03d484ab
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/03d484ab
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/03d484ab

Branch: refs/heads/streaming_ingest
Commit: 03d484abf2cf5c57aeda11ca9355cfbfbdf137c2
Parents: 924f0b7
Author: sounakr <sounakr@gmail.com>
Authored: Thu Jun 29 01:15:21 2017 +0530
Committer: ravipesala <ravi.pesala@gmail.com>
Committed: Mon Jul 3 15:06:43 2017 +0530

----------------------------------------------------------------------
 .../collector/impl/DictionaryBasedVectorResultCollector.java    | 5 +++--
 .../collector/impl/RestructureBasedVectorResultCollector.java   | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/03d484ab/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java
b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java
index 73ccb5d..c857a47 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/DictionaryBasedVectorResultCollector.java
@@ -139,8 +139,9 @@ public class DictionaryBasedVectorResultCollector extends AbstractScannedResultC
       }
       int rowCounter = scannedResult.getRowCounter();
       int availableRows = currentPageRowCount - rowCounter;
-      int requiredRows =
-          columnarBatch.getBatchSize() - (columnarBatch.getActualSize() + filteredRows);
+      // getRowCounter holds total number or rows being placed in Vector. Calculate the
+      // Left over space through getRowCounter only.
+      int requiredRows = columnarBatch.getBatchSize() - columnarBatch.getRowCounter();
       requiredRows = Math.min(requiredRows, availableRows);
       if (requiredRows < 1) {
         return;

http://git-wip-us.apache.org/repos/asf/carbondata/blob/03d484ab/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java
b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java
index 6f45c47..8ae0d96 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java
@@ -103,7 +103,7 @@ public class RestructureBasedVectorResultCollector extends DictionaryBasedVector
       }
       int rowCounter = scannedResult.getRowCounter();
       int availableRows = currentPageRowCount - rowCounter;
-      int requiredRows = columnarBatch.getBatchSize() - columnarBatch.getActualSize();
+      int requiredRows = columnarBatch.getBatchSize() - columnarBatch.getRowCounter();
       requiredRows = Math.min(requiredRows, availableRows);
       if (requiredRows < 1) {
         return;


Mime
View raw message