carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [33/51] [abbrv] carbondata git commit: [CARBONDATA-1465] resolved bug for hive cant query carbon table when column name is in small letters
Date Mon, 18 Sep 2017 10:01:52 GMT
[CARBONDATA-1465] resolved bug for hive cant query carbon table when column name is in small
letters

1.Resolved bug for hive can't query carbon when column name is in small letters  2.Corrected
the hive guide there is no need of alter table statement to alter location now it is done
by CarbonHiveMetastore Event listener itself

This closes #1347


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

Branch: refs/heads/branch-1.2
Commit: c15a11d089ed5c9fa679ed7052de481c59188aab
Parents: 887310f
Author: anubhav100 <anubhav.tarar@knoldus.in>
Authored: Mon Sep 11 15:58:16 2017 +0530
Committer: chenliang613 <chenliang613@apache.org>
Committed: Wed Sep 13 22:46:07 2017 +0800

----------------------------------------------------------------------
 integration/hive/hive-guide.md                                   | 1 -
 .../java/org/apache/carbondata/hive/MapredCarbonInputFormat.java | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/c15a11d0/integration/hive/hive-guide.md
----------------------------------------------------------------------
diff --git a/integration/hive/hive-guide.md b/integration/hive/hive-guide.md
index d554efa..b3848b5 100644
--- a/integration/hive/hive-guide.md
+++ b/integration/hive/hive-guide.md
@@ -91,7 +91,6 @@ $HIVE_HOME/bin/hive
 ### Query data from hive table
 
 ```
-alter table hive_carbon set location '<hdfs store path>/hive_carbon';
 set hive.mapred.supports.subdirectories=true;
 set mapreduce.input.fileinputformat.input.dir.recursive=true;
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/c15a11d0/integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
----------------------------------------------------------------------
diff --git a/integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
b/integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
index 8f3fdce..2e840c0 100644
--- a/integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
+++ b/integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
@@ -163,7 +163,7 @@ public class MapredCarbonInputFormat extends CarbonInputFormat<ArrayWritable>
     StringBuilder allColumns = new StringBuilder();
     StringBuilder projectionColumns = new StringBuilder();
     for (CarbonColumn column : carbonColumns) {
-      carbonColumnNames.add(column.getColName());
+      carbonColumnNames.add(column.getColName().toLowerCase());
       allColumns.append(column.getColName() + ",");
     }
 
@@ -172,7 +172,7 @@ public class MapredCarbonInputFormat extends CarbonInputFormat<ArrayWritable>
       //verify that the columns parsed by Hive exist in the table
       for (String col : columnNames) {
         //show columns command will return these data
-        if (carbonColumnNames.contains(col)) {
+        if (carbonColumnNames.contains(col.toLowerCase())) {
           projectionColumns.append(col + ",");
         }
       }


Mime
View raw message