You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2019/12/17 19:34:31 UTC

[GitHub] [incubator-gobblin] ZihanLi58 commented on a change in pull request #2851: [GOBBLIN-1006] Enable configurable case-preserving and schema source-of-truth in table level properties

ZihanLi58 commented on a change in pull request #2851: [GOBBLIN-1006] Enable configurable case-preserving and schema source-of-truth in table level properties
URL: https://github.com/apache/incubator-gobblin/pull/2851#discussion_r358986094
 
 

 ##########
 File path: gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/query/HiveAvroORCQueryGenerator.java
 ##########
 @@ -160,21 +163,25 @@ public static String generateCreateTableDDL(Schema schema,
     //    (evolution does not matter if its new destination table)
     // 4. If evolution is disabled, and destination table does exists
     //    .. use columns from destination schema
+    // Make sure the schema attribute will be updated in source-of-truth attribute.
+    // Or fall back to default attribute-pair used in Hive for ORC format.
+    if (tableProperties.containsKey(SCHEMA_SOURCE_OF_TRUTH)) {
+      tableProperties.setProperty(tableProperties.getProperty(SCHEMA_SOURCE_OF_TRUTH), schema.toString());
+      tableProperties.remove(SCHEMA_SOURCE_OF_TRUTH);
 
 Review comment:
   Just curious about what is this for? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services