Will-Lo commented on code in PR #3633:
URL: https://github.com/apache/gobblin/pull/3633#discussion_r1105141078


##########
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/writer/HiveMetadataWriter.java:
##########
@@ -281,15 +281,24 @@ private boolean inHiveSpecCache(String tableKey) {
   }
 
   private void updateLatestSchemaMapWithExistingSchema(String dbName, String 
tableName, String tableKey) throws IOException {
+    updateLatestSchemaMapWithExistingSchema(dbName, tableName, tableKey, 
useExistingTableSchemaAllowDenyList, hiveRegister, latestSchemaMap);
+  }
+
+  // returns if latest schema map was updated with the existing schema in Hive

Review Comment:
   This should be a javadoc



##########
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/writer/HiveMetadataWriter.java:
##########
@@ -281,15 +281,24 @@ private boolean inHiveSpecCache(String tableKey) {
   }
 
   private void updateLatestSchemaMapWithExistingSchema(String dbName, String 
tableName, String tableKey) throws IOException {
+    updateLatestSchemaMapWithExistingSchema(dbName, tableName, tableKey, 
useExistingTableSchemaAllowDenyList, hiveRegister, latestSchemaMap);
+  }
+
+  // returns if latest schema map was updated with the existing schema in Hive
+  @VisibleForTesting
+  protected static boolean updateLatestSchemaMapWithExistingSchema(String 
dbName, String tableName, String tableKey,

Review Comment:
   Is there a reason why this function returns a boolean if we just ignore the 
return value in the wrapper function? Is it just for ease of testing purposes?



##########
gobblin-iceberg/src/test/java/org/apache/gobblin/iceberg/writer/HiveMetadataWriterTest.java:
##########
@@ -80,6 +82,10 @@
 import org.apache.gobblin.stream.RecordEnvelope;
 import org.apache.gobblin.util.ClustersNames;
 import org.apache.gobblin.util.ConfigUtils;
+import org.apache.gobblin.util.function.CheckedExceptionFunction;
+import org.mockito.Mockito;
+
+import static org.mockito.Matchers.eq;
 
 
 public class HiveMetadataWriterTest extends HiveMetastoreTest {

Review Comment:
   Is there a reason why we can't move this class to the hive module? Is it a 
dependency issue? To me it seems like one of these classes should ultimately 
live in the other's module but I might be overlooking something here



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

Reply via email to