Description
VolcanoRuleCall.java:250 wrap any exception into RuntimeException, so it can break UX for public API as the actual exception will be in cause
Caused by: java.lang.RuntimeException: Error while applying rule ExposeIndexRule, args [rel#27:IgniteLogicalTableScan.NONE.[].any(table=[PUBLIC, TBL1],filters=AND(=($t2, _UTF-8'v'), =($t3, _UTF-8'v')),requiredColumns={0, 1, 2, 3})] at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:250) at org.apache.calcite.plan.volcano.TopDownRuleDriver.applyGenerator(TopDownRuleDriver.java:151) at org.apache.calcite.plan.volcano.TopDownRuleDriver.access$600(TopDownRuleDriver.java:51) at org.apache.calcite.plan.volcano.TopDownRuleDriver$ApplyRule.perform(TopDownRuleDriver.java:532) at org.apache.calcite.plan.volcano.TopDownRuleDriver.drive(TopDownRuleDriver.java:109) at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:524) at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:328) at org.apache.ignite.internal.sql.engine.prepare.IgnitePlanner.transform(IgnitePlanner.java:386) at org.apache.ignite.internal.sql.engine.prepare.PlannerHelper.optimize(PlannerHelper.java:125) at org.apache.ignite.internal.sql.engine.planner.AbstractPlannerTest.physicalPlan(AbstractPlannerTest.java:384) at org.apache.ignite.internal.sql.engine.planner.AbstractPlannerTest.physicalPlan(AbstractPlannerTest.java:372) at org.apache.ignite.internal.sql.engine.planner.AbstractPlannerTest.physicalPlan(AbstractPlannerTest.java:356) at org.apache.ignite.internal.sql.engine.planner.AbstractPlannerTest.physicalPlan(AbstractPlannerTest.java:344) at org.apache.ignite.internal.sql.engine.planner.AbstractPlannerTest.physicalPlan(AbstractPlannerTest.java:333) at org.apache.ignite.internal.sql.engine.planner.hints.ForceIndexHintPlannerTest.lambda$testWithMultipleIndexHints$0(ForceIndexHintPlannerTest.java:137) at org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrowsWithCause(IgniteTestUtils.java:313)
Steps to reproduce
Replace
IgniteTestUtils.assertThrowsWithCause to assertThrowsSqlException
For tests:
HashIndexPlannerTest#testHashIndexIsNotAppliedWithoutConditions,
HashIndexPlannerTest#hashIndexIsNotAppliedForRangeCondition
Expected that SqlException will be thrown, not RuntimeException with SqlException as cause
Attachments
Issue Links
- Discovered while testing
-
IGNITE-21278 Add FORCE_INDEX/NO_INDEX hints for calcite engine
- Resolved
- links to