Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming of ConfVars Enums in Apache Hive breaks compatibility of HiveCatalog dependency in Apache Iceberg #10254

Closed
dom93dd opened this issue Apr 30, 2024 · 8 comments
Labels
improvement PR that improves existing functionality

Comments

@dom93dd
Copy link

dom93dd commented Apr 30, 2024

Feature Request / Improvement

With following PR apache/hive#4919 all ConfVars Enums in Apache.Hive dependency were renamed for better readability. This is included from the 4.0.0 Beta version in Hive.

Unfortunately, this breaks the compatibility with with apache.iceberg.hive dependency. Especially for the HiveCatalog class.

My suggestion is to change all the Enums in apache.icerberg too.

Query engine

Hive

@nastra
Copy link
Contributor

nastra commented Apr 30, 2024

The hive-related code in Iceberg is for Hive < 4, meaning that nothing needs to be done in the Iceberg repo. Everything that's relevenant has already been done in apache/hive#4919. Also if you look at the content of the PR, the Iceberg-related changes have been taking care of. This is because Iceberg-related changed for Hive 4+ have been moved to the Hive repo.

@dom93dd
Copy link
Author

dom93dd commented Apr 30, 2024

@nastra I did see that and moved over to that dependency. The problem is, that apache.hive is using shading for fasterxml in the https://mvnrepository.com/artifact/org.apache.hive/hive-iceberg-catalog/4.0.0 dependency (https://mvnrepository.com/artifact/org.apache.hive/hive-iceberg-shading). That breaks the usage of the JsonUtil class from apache.iceberg which isn't using shading for fasterxml.
I added my own shading to resolve this issue, but in my case I need to build a thin jar where I can't include the fix.

My guess is, that the shading of fasterxml needs to be removed in apache.hive:
https://github.com/apache/hive/blob/master/iceberg/iceberg-shading/pom.xml

@nastra
Copy link
Contributor

nastra commented Apr 30, 2024

Shading in https://github.com/apache/hive/blob/master/iceberg/iceberg-shading/pom.xml#L97-L100 is correct IMO. Are you using the iceberg-core jar directly rather than through a shaded jar? If that's the case, then you'd need to switch to using a shaded jar

@dom93dd
Copy link
Author

dom93dd commented Apr 30, 2024

@nastra Do you mean those two deps?:

<dependency>
	<groupId>org.apache.hive</groupId>
	<artifactId>patched-iceberg-core</artifactId>
	<version>patched-1.4.3-4.0.0</version>
</dependency>
<dependency>
	<groupId>org.apache.hive</groupId>
	<artifactId>patched-iceberg-api</artifactId>
	<version>patched-1.4.3-4.0.0</version>
</dependency>

Even when using that, I get the error for the shading (missing function of fasterxml mapper).

I need to use this dependency to resolve the missing underscores in HiveCatalog:

<dependency>
	<groupId>org.apache.hive</groupId>
	<artifactId>hive-iceberg-catalog</artifactId>
	<version>4.0.0</version>
</dependency>

@nastra
Copy link
Contributor

nastra commented Apr 30, 2024

Those seem to be patched versions for api/core. What you typically would use is a shaded version that bundles all dependencies together. In any case, I don't see anything that needs to be fixed in the Iceberg repo itself related to this, so I think this issue can be closed.

@dom93dd
Copy link
Author

dom93dd commented Apr 30, 2024

@nastra Are you suggesting that we should build our own shaded jar with all dependencies or is there a shaded jar of iceberg available?

@nastra
Copy link
Contributor

nastra commented May 2, 2024

For Hive < 4 there is iceberg-hive-runtime (which is maintained by the Iceberg community)
For Hive >= 4 there is hive-iceberg-shading (which is maintained by the Hive community)

@dom93dd
Copy link
Author

dom93dd commented May 2, 2024

@nastra Danke Dir!

@dom93dd dom93dd closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement PR that improves existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants