carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [44/50] [abbrv] carbondata git commit: Rectify Vector Buffer Calculation
Date Thu, 06 Jul 2017 14:42:09 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/d4adc09d
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/d4adc09d
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/d4adc09d

Branch: refs/heads/branch-1.1
Commit: d4adc09d42a84f210e3923b0060004bf83b95ef0
Parents: 6a63c06
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:12:06 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/d4adc09d/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/d4adc09d/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