Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-27998 Upgrade Calcite version to 1.30
  3. FLINK-29143

NPE after calcite upgrade at org.apache.calcite.tools.RelBuilder.groupKey(RelBuilder.java:1287)

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Table SQL / API
    • None

    Description

      en example of failure after upgrade to 1.30
      It seems a root cause of about 40 failing tests
      at AggregateReduceGroupingTest, LookupJoinTest, NestedLoopSemiAntiJoinTest, SemiAntiJoinTest, ShuffledHashSemiAntiJoinTest, MultipleInputCreationTest, RemoveCollationTest and others
       

      java.lang.RuntimeException: Error while applying rule FlinkAggregateJoinTransposeRule, args [rel#23788:LogicalAggregate.NONE.any.[](input=RelSubset#23754,group={0, 1, 3, 4},EXPR$4=COUNT($2),agg#1=SUM($5),agg#2=COUNT($5)), rel#23753:LogicalJoin.NONE.any.[](left=RelSubset#23749,right=RelSubset#23752,condition==($1, $3),joinType=inner)]
      	at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:250)
      	at org.apache.calcite.plan.volcano.IterativeRuleDriver.drive(IterativeRuleDriver.java:59)
      	at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:523)
      	at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:317)
      	at org.apache.flink.table.planner.plan.optimize.program.FlinkVolcanoProgram.optimize(FlinkVolcanoProgram.scala:62)
      	at org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram.$anonfun$optimize$1(FlinkChainedProgram.scala:59)
      	at scala.collection.TraversableOnce.$anonfun$foldLeft$1(TraversableOnce.scala:156)
      	at scala.collection.TraversableOnce.$anonfun$foldLeft$1$adapted(TraversableOnce.scala:156)
      	at scala.collection.Iterator.foreach(Iterator.scala:937)
      	at scala.collection.Iterator.foreach$(Iterator.scala:937)
      	at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
      	at scala.collection.IterableLike.foreach(IterableLike.scala:70)
      	at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
      	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
      	at scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:156)
      	at scala.collection.TraversableOnce.foldLeft$(TraversableOnce.scala:154)
      	at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104)
      	at org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram.optimize(FlinkChainedProgram.scala:55)
      	at org.apache.flink.table.planner.plan.optimize.BatchCommonSubGraphBasedOptimizer.optimizeTree(BatchCommonSubGraphBasedOptimizer.scala:93)
      	at org.apache.flink.table.planner.plan.optimize.BatchCommonSubGraphBasedOptimizer.optimizeBlock(BatchCommonSubGraphBasedOptimizer.scala:58)
      	at org.apache.flink.table.planner.plan.optimize.BatchCommonSubGraphBasedOptimizer.$anonfun$doOptimize$1(BatchCommonSubGraphBasedOptimizer.scala:45)
      	at org.apache.flink.table.planner.plan.optimize.BatchCommonSubGraphBasedOptimizer.$anonfun$doOptimize$1$adapted(BatchCommonSubGraphBasedOptimizer.scala:45)
      	at scala.collection.immutable.List.foreach(List.scala:388)
      	at org.apache.flink.table.planner.plan.optimize.BatchCommonSubGraphBasedOptimizer.doOptimize(BatchCommonSubGraphBasedOptimizer.scala:45)
      	at org.apache.flink.table.planner.plan.optimize.CommonSubGraphBasedOptimizer.optimize(CommonSubGraphBasedOptimizer.scala:87)
      	at org.apache.flink.table.planner.delegation.PlannerBase.optimize(PlannerBase.scala:315)
      	at org.apache.flink.table.planner.utils.TableTestUtilBase.assertPlanEquals(TableTestBase.scala:982)
      	at org.apache.flink.table.planner.utils.TableTestUtilBase.doVerifyPlan(TableTestBase.scala:847)
      	at org.apache.flink.table.planner.utils.TableTestUtilBase.verifyExecPlan(TableTestBase.scala:634)
      	at org.apache.flink.table.planner.plan.common.AggregateReduceGroupingTestBase.verifyPlan(AggregateReduceGroupingTestBase.scala:347)
      	at org.apache.flink.table.planner.plan.common.AggregateReduceGroupingTestBase.testAggOnInnerJoin2(AggregateReduceGroupingTestBase.scala:146)
      	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:258)
      	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
      	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
      	at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:42)
      	at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80)
      	at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:72)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
      	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
      	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.lambda$execute$1(JUnitPlatformProvider.java:199)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:193)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:154)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:120)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
      	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
      Caused by: java.lang.NullPointerException
      	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:878)
      	at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:229)
      	at org.apache.calcite.tools.RelBuilder.groupKey(RelBuilder.java:1287)
      	at org.apache.flink.table.planner.plan.rules.logical.FlinkAggregateJoinTransposeRule.onMatch(FlinkAggregateJoinTransposeRule.java:373)
      	at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223)
      	... 77 more
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Sergey Nuyanzin Sergey Nuyanzin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: