You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2015/11/10 02:54:25 UTC

hive git commit: HIVE-11201 : HCatalog is ignoring user specified avro schema in the table definition (Bing Li via Ashutosh Chauhan)

Repository: hive
Updated Branches:
  refs/heads/master 41b60c444 -> d5a69ec8c


HIVE-11201 : HCatalog  is ignoring user specified avro schema in the table definition (Bing Li via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


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

Branch: refs/heads/master
Commit: d5a69ec8c078cdfd8cb01eae21009cd6366d6644
Parents: 41b60c4
Author: Bing Li <sa...@gmail.com>
Authored: Tue Jul 7 23:56:00 2015 -0800
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Mon Nov 9 17:51:06 2015 -0800

----------------------------------------------------------------------
 .../org/apache/hive/hcatalog/mapreduce/SpecialCases.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/d5a69ec8/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/SpecialCases.java
----------------------------------------------------------------------
diff --git a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/SpecialCases.java b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/SpecialCases.java
index 1bf6f07..756abf8 100644
--- a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/SpecialCases.java
+++ b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/SpecialCases.java
@@ -112,14 +112,14 @@ public class SpecialCases {
         colTypes.add(TypeInfoUtils.getTypeInfoFromTypeString(field.getTypeString()));
       }
 
-      jobProperties.put(AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName(),
+      if (jobProperties.get(AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName())==null
+          || jobProperties.get(AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName()).isEmpty()) {
+     
+        jobProperties.put(AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName(),
           AvroSerDe.getSchemaFromCols(properties, colNames, colTypes, null).toString());
-
-
-      for (String propName : jobProperties.keySet()){
-        String propVal = jobProperties.get(propName);
       }
 
+
     }
   }