[
https://issues.apache.org/jira/browse/GOBBLIN-1826?focusedWorklogId=859462&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-859462
]
ASF GitHub Bot logged work on GOBBLIN-1826:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 27/Apr/23 18:09
Start Date: 27/Apr/23 18:09
Worklog Time Spent: 10m
Work Description: Will-Lo merged PR #3688:
URL: https://github.com/apache/gobblin/pull/3688
Issue Time Tracking
-------------------
Worklog Id: (was: 859462)
Time Spent: 1h 10m (was: 1h)
> Fix bug in Hive registration code where fields could be miscasted in types
> --------------------------------------------------------------------------
>
> Key: GOBBLIN-1826
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1826
> Project: Apache Gobblin
> Issue Type: Bug
> Components: gobblin-core
> Reporter: William Lo
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> 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
> {code:java}
> protected static <T> Optional<T> populateField(State state, String key,
> TypeToken<T> token) {
> {code}
> 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.
> {code:java}
> java.lang.ClassCastException: java.lang.String cannot be cast to
> java.lang.Long at
> org.apache.gobblin.hive.metastore.HiveMetaStoreUtils.getTable(HiveMetaStoreUtils.java:111)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)