You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2015/11/12 05:00:02 UTC
[38/55] [abbrv] hive git commit: HIVE-11201 : HCatalog is ignoring
user specified avro schema in the table definition (Bing Li via Ashutosh
Chauhan)
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/spark
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);
}
+
}
}