You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Ulrich Kramer (Jira)" <ji...@apache.org> on 2022/11/30 13:45:00 UTC
[jira] [Created] (CALCITE-5409) Jdbc doesn't support EnumerableRules.ENUMERABLE_BATCH_NESTED_LOOP_JOIN_RULE
Ulrich Kramer created CALCITE-5409:
--------------------------------------
Summary: Jdbc doesn't support EnumerableRules.ENUMERABLE_BATCH_NESTED_LOOP_JOIN_RULE
Key: CALCITE-5409
URL: https://issues.apache.org/jira/browse/CALCITE-5409
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.32.0
Reporter: Ulrich Kramer
Adding the following unit test to {{JdbcAdapterTest}} causes an {{NullPointerException}}
{code:java}
@Test void testBatchNestedLoopJoin() {
CalciteAssert.that()
.with(CalciteConnectionProperty.LEX, Lex.JAVA)
.with(CalciteConnectionProperty.FORCE_DECORRELATE, false)
.withSchema("s", new ReflectiveSchema(new HrSchema()))
.withModel(FoodmartSchema.FOODMART_MODEL)
.query("select e.name from emps e join foodmart.store x on e.deptno = x.store_id")
.withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> {
planner.removeRule(EnumerableRules.ENUMERABLE_CORRELATE_RULE);
planner.addRule(EnumerableRules.ENUMERABLE_BATCH_NESTED_LOOP_JOIN_RULE);
})
.runs();
}
{code}
{code}
Error while executing SQL "select e.name from emps e join foodmart.store x on e.deptno = x.store_id": Unable to implement EnumerableCalc(expr#0..2=[{inputs}], name=[$t0]): rowcount = 375.0, cumulative cost = {1465.0 rows, 2968.0 cpu, 0.0 io}, id = 174
EnumerableBatchNestedLoopJoin(condition=[=($1, $2)], joinType=[inner], variablesSet=[[$cor0, ... $cor99]], batchSize=[100]): rowcount = 375.0, cumulative cost = {1090.0 rows, 1468.0 cpu, 0.0 io}, id = 170
EnumerableCalc(expr#0..4=[{inputs}], expr#5=[CAST($t1):INTEGER NOT NULL], name=[$t2], deptno0=[$t5]): rowcount = 100.0, cumulative cost = {200.0 rows, 901.0 cpu, 0.0 io}, id = 176
EnumerableTableScan(table=[[s, emps]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 52
JdbcToEnumerableConverter: rowcount = 25.0, cumulative cost = {207.5 rows, 283.5 cpu, 0.0 io}, id = 168
JdbcFilter(condition=[OR(=($cor0.deptno0, $0), ...)]): rowcount = 25.0, cumulative cost = {205.0 rows, 281.0 cpu, 0.0 io}, id = 166
JdbcProject(store_id=[$0]): rowcount = 100.0, cumulative cost = {180.0 rows, 181.0 cpu, 0.0 io}, id = 164
JdbcTableScan(table=[[foodmart, store]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 3
...
Suppressed: java.lang.NullPointerException: variable $cor0 is not found
{code}
See also https://issues.apache.org/jira/browse/CALCITE-5354
--
This message was sent by Atlassian Jira
(v8.20.10#820010)