Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-24553

Exclude calcite from test-jar dependency of hive-exec

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.3.8
    • 2.3.8
    • None
    • Reviewed

    Description

      The test "org.apache.hive.beeline.cli.TestHiveCli - testSetHeaderValue" we found the exception:

      Caused by: java.lang.NoSuchMethodError: org.apache.calcite.rel.RelCollationImpl.<init>(Lorg/apache/hive/com/google/common/collect/ImmutableList;)V
      	at org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelCollation.<init>(HiveRelCollation.java:29) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.optimizer.calcite.RelOptHiveTable.getCollationList(RelOptHiveTable.java:181) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.calcite.rel.metadata.RelMdCollation.table(RelMdCollation.java:175) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.calcite.rel.metadata.RelMdCollation.collations(RelMdCollation.java:122) ~[calcite-core-1.10.0.jar:1.10.0]
      	at GeneratedMetadataHandler_Collation.collations_$(Unknown Source) ~[?:?]
      	at GeneratedMetadataHandler_Collation.collations(Unknown Source) ~[?:?]
      	at org.apache.calcite.rel.metadata.RelMetadataQuery.collations(RelMetadataQuery.java:482) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.trimChild(RelFieldTrimmer.java:189) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.trimFields(RelFieldTrimmer.java:374) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveRelFieldTrimmer.trimFields(HiveRelFieldTrimmer.java:273) ~[hive-exec-2.3.8.jar:2.3.8]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_262]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_262]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_262]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_262]
      	at org.apache.calcite.util.ReflectUtil$2.invoke(ReflectUtil.java:531) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.dispatchTrimFields(RelFieldTrimmer.java:270) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.trim(RelFieldTrimmer.java:160) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1331) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1261) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.calcite.tools.Frameworks$1.apply(Frameworks.java:113) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:997) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:149) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:106) ~[calcite-core-1.10.0.jar:1.10.0]
      	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1069) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.getOptimizedAST(CalcitePlanner.java:1085) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:364) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11138) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:286) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:512) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1317) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1295) ~[hive-exec-2.3.8.jar:2.3.8]
      	at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:204) ~[hive-service-2.3.8.jar:2.3.8]
      	... 50 more
      

      This looks like adding dependency of test-jar of hive-exec pulls in the unshaded calcite dependencies which conflicts with shaded calcite. We should exclude unshaded calcite when adding test-jar of hive-exec.

      Attachments

        Issue Links

          Activity

            People

              viirya L. C. Hsieh
              viirya L. C. Hsieh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h