hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ct...@apache.org
Subject hive git commit: HIVE-15061: Metastore types are sometimes case sensitive (Chaoyu Tang, review by Mohit Sabharwal)
Date Mon, 31 Oct 2016 21:04:37 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2.1 dde488142 -> 80b07766a


HIVE-15061: Metastore types are sometimes case sensitive (Chaoyu Tang, review by Mohit Sabharwal)


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

Branch: refs/heads/branch-2.1
Commit: 80b07766afa3815c56f9aed84b9b0ad2caf3189d
Parents: dde4881
Author: ctang <ctang@cloudera.com>
Authored: Mon Oct 31 17:03:02 2016 -0400
Committer: ctang <ctang@cloudera.com>
Committed: Mon Oct 31 17:04:17 2016 -0400

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/metastore/HiveAlterHandler.java     | 6 +++---
 .../java/org/apache/hadoop/hive/metastore/HiveMetaStore.java   | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/80b07766/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
index 68c6e44..38180c2 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
@@ -585,8 +585,8 @@ public class HiveAlterHandler implements AlterHandler {
         for (ColumnStatisticsObj statsObj : statsObjs) {
           boolean found =false;
           for (FieldSchema newCol : newCols) {
-            if (statsObj.getColName().equals(newCol.getName())
-                && statsObj.getColType().equals(newCol.getType())) {
+            if (statsObj.getColName().equalsIgnoreCase(newCol.getName())
+                && statsObj.getColType().equalsIgnoreCase(newCol.getType())) {
               found = true;
               break;
             }
@@ -683,7 +683,7 @@ public class HiveAlterHandler implements AlterHandler {
                 boolean found = false;
                 for (FieldSchema newCol : newCols) {
                   if (statsObj.getColName().equalsIgnoreCase(newCol.getName())
-                      && statsObj.getColType().equals(newCol.getType())) {
+                      && statsObj.getColType().equalsIgnoreCase(newCol.getType()))
{
                     found = true;
                     break;
                   }

http://git-wip-us.apache.org/repos/asf/hive/blob/80b07766/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index e46e4d1a..6394503 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -4589,6 +4589,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
       for (ColumnStatisticsObj statsObj:statsObjs) {
         colName = statsObj.getColName().toLowerCase();
         statsObj.setColName(colName);
+        statsObj.setColType(statsObj.getColType().toLowerCase());
       }
 
      colStats.setStatsDesc(statsDesc);
@@ -4631,6 +4632,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
       for (ColumnStatisticsObj statsObj:statsObjs) {
         colName = statsObj.getColName().toLowerCase();
         statsObj.setColName(colName);
+        statsObj.setColType(statsObj.getColType().toLowerCase());
       }
 
       colStats.setStatsDesc(statsDesc);


Mime
View raw message