[ 
https://issues.apache.org/jira/browse/GOBBLIN-1485?focusedWorklogId=615882&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-615882
 ]

ASF GitHub Bot logged work on GOBBLIN-1485:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jun/21 22:27
            Start Date: 28/Jun/21 22:27
    Worklog Time Spent: 10m 
      Work Description: ZihanLi58 commented on a change in pull request #3324:
URL: https://github.com/apache/gobblin/pull/3324#discussion_r660155720



##########
File path: 
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnitComparator.java
##########
@@ -142,12 +145,24 @@ public T compareIsStoredAsSubDirs() {
     return (T) this;
   }
 
+  private State extractSchemaVersion(State state) {
+    State newState = new State(state);
+    String schemaFromState = 
state.getProp(AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName());
+    if (schemaFromState != null && !schemaFromState.isEmpty()) {
+      String schemaVersion = AvroUtils.getSchemaCreationTime(new 
Schema.Parser().parse(schemaFromState));
+      if (schemaVersion != null && !schemaVersion.isEmpty()) {
+         
newState.removeProp(AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName());

Review comment:
       The whole schema may contains special character, so when comparing 
whether we need to update the table, we remove this prop, but it's a new state 
object, so we are not removing this prop from the hive unit.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 615882)
    Time Spent: 50m  (was: 40m)

> Enable feature to get schema from writer schema when do hive registration
> -------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1485
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1485
>             Project: Apache Gobblin
>          Issue Type: New Feature
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Enable feature to get schema from writer schema when do hive registration, so 
> that we can avoid list operations to get the latest schema 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to