-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-24551: Hive should include transitive dependencies from calcite after shading it #1792
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
Conversation
ql/pom.xml
Outdated
<!-- include all of calcite's transitive dependencies as well since | ||
otherwise they'll be removed in assembly packaging --> | ||
<include>net.hydromatic:eigenbase-properties</include> | ||
<include>org.codehaus.janino:janino</include> | ||
<include>org.codehaus.janino:commons-compiler</include> | ||
<include>org.pentaho:pentaho-aggdesigner-algorithm</include> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question. Will this be flaky? Once calcite changes transitive dependencies, seems we also need to update this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's the downside of it - whenever we upgrade calcite we should check its dependencies and update here as well. I'm not sure if there is an easy way to include an artifact and all its transitive dependencies in the maven-shade-plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I remember in the latest branch, the shading guava PR doesn't include transitive dependencies like that. Do we also need to do it for the branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to verify whether there is issue in master/4.0.0 as well - it uses calcite 1.21 which no longer depend on eigenbase that is causing the issue in our case, but I think it might be good to always include transitive dependencies anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I tried master branch and didn't hit the issue. However I think I may still open another PR for it since we don't really when the transitive dependencies will be needed at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually in master we already handles this here, as part of HIVE-22126. I think we should follow the same approach and explicitly add the transitive dependency in Hive's top-level pom. I think this is also how Spark manages its transitive dependencies? it might be better than pulling out the classes and putting them in the fat jar.
Thank you for pinging me, @sunchao . |
Updated the PR to fix a hanging issue when testing
which caused the test to hang. After upgrading Accumulo version to 1.7.3 (which is the same version used by Hive 3.0+) the issue is resolved. |
What changes were proposed in this pull request?
This includes
calcite-core
's transitive dependencies:in the fat
hive-exec
jar.Why are the changes needed?
Currently as part of effort of shading Guava from Hive, we shade Calcite and exclude all its artifacts from the binary distribution. However, this also removes all its transitive dependencies which will still needed at runtime. Without these, Hive queries will fail with error like:
Does this PR introduce any user-facing change?
No
How was this patch tested?
Verified that the classes are included in the
hive-exec
jars with the change. I also manually tested this by launching a HS2 and run a simple query against it. It passed while previous was failing due to the above error.