pjain1 opened a new issue, #14360:
URL: https://github.com/apache/druid/issues/14360
## Description
Running this full outer join query on the standard wikipedia datasource
throws exception
Query -
```
with raw1 as (
select
"page",
"channel",
"flags",
added
from "wikipedia"
limit 10
),
raw2 as (
select
"page",
"comment",
deleted *added as ad -- problematic expression
from "wikipedia"
limit 10
),
output as (
select
r1.added,
r2.ad
from raw1 r1
full outer join raw2 r2
on r1.page = r2.page
)
select * from output
```
Exception in broker logs -
```
java.lang.AssertionError: Type mismatch:
rowtype of new rel:
RecordType(VARCHAR page, BIGINT added, VARCHAR page0, BIGINT NOT NULL $f3)
NOT NULL
rowtype of set:
RecordType(VARCHAR page, BIGINT added, VARCHAR page0, BIGINT ad) NOT NULL
at org.apache.calcite.util.Litmus$1.fail(Litmus.java:31)
~[calcite-core-1.21.0.jar:1.21.0]
at org.apache.calcite.plan.RelOptUtil.equal(RelOptUtil.java:2026)
~[calcite-core-1.21.0.jar:1.21.0]
at org.apache.calcite.plan.volcano.RelSubset.add(RelSubset.java:284)
~[calcite-core-1.21.0.jar:1.21.0]
at org.apache.calcite.plan.volcano.RelSet.add(RelSet.java:148)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.plan.volcano.VolcanoPlanner.addRelToSet(VolcanoPlanner.java:1818)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1764)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:846)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:868)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:1939)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.plan.volcano.VolcanoRuleCall.transformTo(VolcanoRuleCall.java:129)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:236)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.druid.sql.calcite.rule.DruidJoinRule.onMatch(DruidJoinRule.java:204)
~[classes/:?]
at
org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:208)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:631)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:327)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.calcite.tools.Programs$SequenceProgram.run(Programs.java:346)
~[calcite-core-1.21.0.jar:1.21.0]
at
org.apache.druid.sql.calcite.planner.CalcitePlanner.transform(CalcitePlanner.java:399)
~[classes/:?]
at
org.apache.druid.sql.calcite.planner.QueryHandler.planWithDruidConvention(QueryHandler.java:486)
~[classes/:?]
at
org.apache.druid.sql.calcite.planner.QueryHandler$SelectHandler.planForDruid(QueryHandler.java:640)
~[classes/:?]
at
org.apache.druid.sql.calcite.planner.QueryHandler.plan(QueryHandler.java:211)
~[classes/:?]
at
org.apache.druid.sql.calcite.planner.DruidPlanner.plan(DruidPlanner.java:230)
~[classes/:?]
at
org.apache.druid.sql.DirectStatement.createPlan(DirectStatement.java:241)
~[classes/:?]
at org.apache.druid.sql.DirectStatement.plan(DirectStatement.java:219)
~[classes/:?]
at org.apache.druid.sql.http.SqlResource.doPost(SqlResource.java:131)
~[classes/:?
```
### Affected Version
Getting on Druid 25 but should be affecting all versions
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]