Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
After the Guava 20 upgrade, there was a major bug in the Hive registration code where fields could be casted as an unexpected type in HiveRegistrationUnit
protected static <T> Optional<T> populateField(State state, String key, TypeToken<T> token) {
The field setter is returning an Optional generic, which allows the code to compile but fail during runtime as the types are mismatched, leading to a casting exception when reading the type e.g.
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long at org.apache.gobblin.hive.metastore.HiveMetaStoreUtils.getTable(HiveMetaStoreUtils.java:111)