carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [26/50] carbondata git commit: [HOTFIX] Minor optimization for getBlockletNumber to return integer
Date Mon, 30 Jul 2018 18:42:52 GMT
[HOTFIX] Minor optimization for getBlockletNumber to return integer

This closes #2543


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

Branch: refs/heads/branch-1.4
Commit: da2f03808f0e6c7cd2e85bfc94ad9ecd66822861
Parents: f8b313a
Author: Jacky Li <jacky.likun@qq.com>
Authored: Tue Jul 24 10:33:14 2018 +0800
Committer: ravipesala <ravi.pesala@gmail.com>
Committed: Tue Jul 31 00:11:26 2018 +0530

----------------------------------------------------------------------
 .../core/scan/collector/impl/RowIdBasedResultCollector.java      | 2 +-
 .../core/scan/collector/impl/RowIdRawBasedResultCollector.java   | 2 +-
 .../collector/impl/RowIdRestructureBasedRawResultCollector.java  | 2 +-
 .../carbondata/core/scan/result/BlockletScannedResult.java       | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/da2f0380/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdBasedResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdBasedResultCollector.java
b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdBasedResultCollector.java
index ec458d6..30ce616 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdBasedResultCollector.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdBasedResultCollector.java
@@ -46,7 +46,7 @@ public class RowIdBasedResultCollector extends DictionaryBasedResultCollector
{
     int columnCount = queryDimensions.length + queryMeasures.length;
     while (scannedResult.hasNext() && rowCounter < batchSize) {
       Object[] row = new Object[columnCount + 3];
-      row[columnCount] = Integer.parseInt(scannedResult.getBlockletNumber());
+      row[columnCount] = scannedResult.getBlockletNumber();
       row[columnCount + 1] = scannedResult.getCurrentPageCounter();
       if (isDimensionExists) {
         surrogateResult = scannedResult.getDictionaryKeyIntegerArray();

http://git-wip-us.apache.org/repos/asf/carbondata/blob/da2f0380/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java
b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java
index f0291fa..a68265d 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRawBasedResultCollector.java
@@ -134,7 +134,7 @@ public class RowIdRawBasedResultCollector extends AbstractScannedResultCollector
       // 3 for blockletId, pageId, rowId
       Object[] row = new Object[1 + queryMeasures.length + 3];
       scannedResult.incrementCounter();
-      row[1 + queryMeasures.length] = Integer.parseInt(scannedResult.getBlockletNumber());
+      row[1 + queryMeasures.length] = scannedResult.getBlockletNumber();
       row[1 + queryMeasures.length + 1] = scannedResult.getCurrentPageCounter();
       ByteArrayWrapper wrapper = new ByteArrayWrapper();
       wrapper.setDictionaryKey(dictionaryKeyArrayBatch.get(i));

http://git-wip-us.apache.org/repos/asf/carbondata/blob/da2f0380/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java
b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java
index e343dea..28e778f 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RowIdRestructureBasedRawResultCollector.java
@@ -106,7 +106,7 @@ public class RowIdRestructureBasedRawResultCollector extends RestructureBasedRaw
       // 3 for blockletId, pageId, rowId
       Object[] row = new Object[1 + queryMeasures.length + 3];
       scannedResult.incrementCounter();
-      row[1 + queryMeasures.length] = Integer.parseInt(scannedResult.getBlockletNumber());
+      row[1 + queryMeasures.length] = scannedResult.getBlockletNumber();
       row[1 + queryMeasures.length + 1] = scannedResult.getCurrentPageCounter();
       ByteArrayWrapper wrapper = new ByteArrayWrapper();
       wrapper.setDictionaryKey(dictionaryKeyArrayBatch.get(i));

http://git-wip-us.apache.org/repos/asf/carbondata/blob/da2f0380/core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java
b/core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java
index a25ebff..daf9a91 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/result/BlockletScannedResult.java
@@ -727,7 +727,7 @@ public abstract class BlockletScannedResult {
     return false;
   }
 
-  public String getBlockletNumber() {
-    return blockletNumber;
+  public int getBlockletNumber() {
+    return Integer.parseInt(blockletNumber);
   }
 }


Mime
View raw message