[
https://issues.apache.org/jira/browse/HIVE-24551?focusedWorklogId=525817&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-525817
]
ASF GitHub Bot logged work on HIVE-24551:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Dec/20 23:50
Start Date: 17/Dec/20 23:50
Worklog Time Spent: 10m
Work Description: sunchao commented on a change in pull request #1792:
URL: https://github.com/apache/hive/pull/1792#discussion_r545480880
##########
File path: ql/pom.xml
##########
@@ -880,6 +880,12 @@
<include>joda-time:joda-time</include>
<include>org.apache.calcite:*</include>
<include>org.apache.calcite.avatica:avatica</include>
+ <!-- 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>
Review comment:
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 which causes the issue
in our case, but I think it might be good to always include transitive
dependencies anyway.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 525817)
Time Spent: 1h 10m (was: 1h)
> Hive should include transitive dependencies from calcite after shading it
> -------------------------------------------------------------------------
>
> Key: HIVE-24551
> URL: https://issues.apache.org/jira/browse/HIVE-24551
> Project: Hive
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.3.8
> Reporter: Chao Sun
> Assignee: Chao Sun
> Priority: Blocker
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> 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:
> {code}
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/eigenbase/util/property/BooleanProperty
> at
> org.apache.calcite.util.SaffronProperties.<init>(SaffronProperties.java:66)
> at
> org.apache.calcite.util.SaffronProperties.instance(SaffronProperties.java:134)
> at org.apache.calcite.util.Util.getDefaultCharset(Util.java:769)
> at
> org.apache.calcite.rel.type.RelDataTypeFactoryImpl.getDefaultCharset(RelDataTypeFactoryImpl.java:565)
> at
> org.apache.calcite.sql.type.SqlTypeUtil.addCharsetAndCollation(SqlTypeUtil.java:1070)
> at
> org.apache.calcite.sql.type.SqlTypeFactoryImpl.createSqlType(SqlTypeFactoryImpl.java:65)
> at org.apache.calcite.rex.RexBuilder.<init>(RexBuilder.java:114)
> at
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:991)
> at
> org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:149)
> at
> org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:106)
> at
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1069)
> at
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.getOptimizedAST(CalcitePlanner.java:1085)
> at
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:364)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11138)
> at
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:286)
> at
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:512)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1317)
> at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1457)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1237)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1227)
> at
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:233)
> at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:184)
> at
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)
> at
> org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
> at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
> at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.hadoop.util.RunJar.run(RunJar.java:234)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
> Caused by: java.lang.ClassNotFoundException:
> org.eigenbase.util.property.BooleanProperty
> at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
> ... 33 more
> {code}
> This happens in branch-2.3 but the same thing might happen in master as well
> - although it uses calcite 1.21 which has changed a lot from 1.10 that
> branch-2.3 is using. For instance, in calcite 1.21 it no longer depends on
> org.eigenbase
--
This message was sent by Atlassian Jira
(v8.3.4#803005)