sv2000 commented on a change in pull request #3329:
URL: https://github.com/apache/gobblin/pull/3329#discussion_r669858840
##########
File path:
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/writer/HiveMetadataWriter.java
##########
@@ -262,13 +264,34 @@ private void
schemaUpdateHelper(GobblinMetadataChangeEvent gmce, HiveSpec spec,
}
}
}
+ } else if
(gmce.getRegistrationProperties().containsKey(HiveMetaStoreBasedRegister.SCHEMA_SOURCE_DB)
+ &&
!gmce.getRegistrationProperties().get(HiveMetaStoreBasedRegister.SCHEMA_SOURCE_DB).equals(spec.getTable().getDbName()))
{
+ // If schema source is NONE and schema source db is set, we will
directly update the schema to source db schema
+ String schemaSourceDb =
gmce.getRegistrationProperties().get(HiveMetaStoreBasedRegister.SCHEMA_SOURCE_DB);
+ try {
+ String sourceSchema = fetchSchemaFromTable(schemaSourceDb,
spec.getTable().getTableName());
Review comment:
Should we cache the sourceSchema to avoid repeated lookups?
##########
File path:
gobblin-iceberg/src/test/java/org/apache/gobblin/iceberg/writer/HiveMetadataWriterTest.java
##########
@@ -278,9 +297,9 @@ public TestHiveRegistrationPolicy(State props) throws
IOException {
}
return tables;
}
- protected Iterable<String> getDatabaseNames(Path path) {
+ /*protected Iterable<String> getDatabaseNames(Path path) {
Review comment:
Remove the commented out block.
--
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]