Closed abhishekrb19 closed 5 months ago
Hi @abhishekrb19, I think we can just use the Class.forName(className)
here instead of using the Class.forName(className, classloader from current thread)
.
Let me know if you want to make a PR to remove those.
Bug
Which Delta project/connector is this regarding?
Describe the problem
Steps to reproduce
Easy to reproduce using a simple ingest query to ingest a Delta table from the Druid-Delta connector. After upgrading the Delta Kernel dependency from
3.1.0
to3.2.0
, we noticed that ingestion from existing Delta tables setup locally stopped working. The stacktrace is:The underlying issue seems to be that it's unable to instantiate
LogStore
, which is coming from a new code path added in https://github.com/delta-io/delta/pull/2770/files.After adding the dependency to the Druid-Delta connector, I was still seeing the same error:
Thanks to @vkorukanti who swiftly helped provide a workaround by adding the following line before making calls to the Kernel APIs:
Thread.currentThread().setContextClassLoader(LogStore.class.getClassLoader());
before calls to the Kernel APIIt's unclear if this workaround is needed for all the Kernel APIs or just specifically when getting the snapshot information - i.e.,
table.getLatestSnapshot(engine)
Observed results
Ingestion fails.
Further details
The slack thread has some more information: https://delta-users.slack.com/archives/CJ70UCSHM/p1719190251166299
Environment information
Willingness to contribute
The Delta Lake Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Delta Lake code base?