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:03:36 GMT
Repository: hive
Updated Branches:
  refs/heads/master 5279af8d3 -> c56fa7250


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/c56fa725
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/c56fa725
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/c56fa725

Branch: refs/heads/master
Commit: c56fa7250ce38de761c15c5e9738de66920ca6e3
Parents: 5279af8
Author: ctang <ctang@cloudera.com>
Authored: Mon Oct 31 17:03:02 2016 -0400
Committer: ctang <ctang@cloudera.com>
Committed: Mon Oct 31 17:03:02 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/c56fa725/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 ede9b52..40b337a 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
@@ -594,8 +594,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;
             }
@@ -692,7 +692,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/c56fa725/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 1ea94c2..60e462f 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -4642,6 +4642,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);
@@ -4684,6 +4685,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