carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [1/2] incubator-carbondata git commit: Fixed Carbondata-848
Date Tue, 04 Apr 2017 13:02:17 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/presto 1797aa4ab -> f39ea5bbe


Fixed Carbondata-848

remove Presto module '


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

Branch: refs/heads/presto
Commit: aab73cb4c9eb678ce5879a405d90a336a3237d79
Parents: 1797aa4
Author: Bhavya <bhavya@knoldus.com>
Authored: Tue Apr 4 14:19:49 2017 +0530
Committer: chenliang613 <chenliang613@huawei.com>
Committed: Tue Apr 4 18:30:43 2017 +0530

----------------------------------------------------------------------
 .../carbondata/presto/CarbondataRecordSetProvider.java  | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/aab73cb4/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataRecordSetProvider.java
----------------------------------------------------------------------
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataRecordSetProvider.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataRecordSetProvider.java
index 85c53ad..63b926f 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataRecordSetProvider.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataRecordSetProvider.java
@@ -77,18 +77,22 @@ public class CarbondataRecordSetProvider implements ConnectorRecordSetProvider
{
         checkType(split, CarbondataSplit.class, "split is not class CarbondataSplit");
     checkArgument(cdSplit.getConnectorId().equals(connectorId), "split is not for this connector");
 
+    String targetCols = "";
     // Convert all columns handles
     ImmutableList.Builder<CarbondataColumnHandle> handles = ImmutableList.builder();
     for (ColumnHandle handle : columns) {
       handles.add(checkType(handle, CarbondataColumnHandle.class, "handle"));
+      targetCols += ((CarbondataColumnHandle) handle).getColumnName() + ",";
     }
 
     // Build column projection(check the column order)
-    String targetCols = "";
-    for (ColumnHandle col : columns) {
-      targetCols += ((CarbondataColumnHandle) col).getColumnName() + ",";
+    if (targetCols.length() > 0) {
+      targetCols = targetCols.substring(0, targetCols.length() - 1);
+    }
+    else
+    {
+      targetCols = null;
     }
-    targetCols = targetCols.substring(0, targetCols.length() - 1);
     //String cols = String.join(",", columns.stream().map(a -> ((CarbondataColumnHandle)a).getColumnName()).collect(Collectors.toList()));
 
     CarbonTableCacheModel tableCacheModel =


Mime
View raw message