hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject hive git commit: HIVE-11201 : HCatalog is ignoring user specified avro schema in the table definition (Bing Li via Ashutosh Chauhan)
Date Tue, 10 Nov 2015 01:54:25 GMT
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 <hashutosh@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 <sarah.libing@gmail.com>
Authored: Tue Jul 7 23:56:00 2015 -0800
Committer: Ashutosh Chauhan <hashutosh@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);
       }
 
+
     }
   }
 


Mime
View raw message