You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "liutang123 (via GitHub)" <gi...@apache.org> on 2025/10/10 06:54:36 UTC
[I] [Bug] mark join and union will throw Input slot(s) not in child's output exception [doris]
liutang123 opened a new issue, #56786:
URL: https://github.com/apache/doris/issues/56786
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Version
3.0.8
### What's Wrong?
```
org.apache.doris.nereids.exceptions.AnalysisException: Input slot(s) not in child's output: $c$1#13#false in plan: LogicalJoin[501] ( type=INNER_JOIN, markJoinSlotReference=Optional.empty, hashJoinConjuncts=
[(id#7 = id#11)], otherJoinConjuncts=[($c$1#13#false OR (id_2#10 = 1))], markJoinConjuncts=[] )
child output is: [id#7, id_2#10, id#11]
plan tree:
LogicalJoin[501] ( type=INNER_JOIN, markJoinSlotReference=Optional.empty, hashJoinConjuncts=[(id#7 = id#11)], otherJoinConjuncts=[($c$1#13#false OR (id_2#10 = 1))], markJoinConjuncts=[] )
|--LogicalProject[462] ( distinct=false, projects=[id_2#10, id#9 AS `id`#7], excepts=[] )
| +--LogicalOlapScan ( qualified=internal.test.aa, indexName=<index_not_selected>, selectedIndexId=1758528836602, preAgg=ON )
+--LogicalProject[499] ( distinct=false, projects=[id#11], excepts=[] )
+--LogicalJoin[498] ( type=LEFT_SEMI_JOIN, markJoinSlotReference=Optional.empty, hashJoinConjuncts=[(id#11 = id#12)], otherJoinConjuncts=[], markJoinConjuncts=[] )
|--LogicalOlapScan ( qualified=internal.test.bb, indexName=<index_not_selected>, selectedIndexId=1758528836645, preAgg=ON )
+--LogicalOlapScan ( qualified=internal.test.cc, indexName=<index_not_selected>, selectedIndexId=1758528836688, preAgg=ON )
at org.apache.doris.nereids.rules.analysis.CheckAfterRewrite.checkAllSlotReferenceFromChildren(CheckAfterRewrite.java:116) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.rules.analysis.CheckAfterRewrite.lambda$build$0(CheckAfterRewrite.java:65) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.pattern.PatternDescriptor.lambda$then$0(PatternDescriptor.java:60) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.pattern.PatternMatcher$1.transform(PatternMatcher.java:92) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.rewrite.PlanTreeRewriteJob.rewrite(PlanTreeRewriteJob.java:57) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.rewrite.PlanTreeRewriteBottomUpJob.rewriteThis(PlanTreeRewriteBottomUpJob.java:91) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.rewrite.PlanTreeRewriteBottomUpJob.execute(PlanTreeRewriteBottomUpJob.java:75) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.scheduler.SimpleJobScheduler.executeJobPool(SimpleJobScheduler.java:44) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.rewrite.RootPlanTreeRewriteJob.execute(RootPlanTreeRewriteJob.java:66) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.executor.AbstractBatchJobExecutor.execute(AbstractBatchJobExecutor.java:139) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.rules.rewrite.RewriteCteChildren.visit(RewriteCteChildren.java:73) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.rules.rewrite.RewriteCteChildren.visit(RewriteCteChildren.java:57) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.trees.plans.visitor.PlanVisitor.visitLogicalSink(PlanVisitor.java:122) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.trees.plans.visitor.SinkVisitor.visitLogicalResultSink(SinkVisitor.java:111) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.trees.plans.logical.LogicalResultSink.accept(LogicalResultSink.java:60) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.rules.rewrite.RewriteCteChildren.rewriteRoot(RewriteCteChildren.java:68) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.rewrite.CustomRewriteJob.execute(CustomRewriteJob.java:61) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.executor.AbstractBatchJobExecutor.execute(AbstractBatchJobExecutor.java:139) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.rewrite.CostBasedRewriteJob.getCost(CostBasedRewriteJob.java:171) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.rewrite.CostBasedRewriteJob.execute(CostBasedRewriteJob.java:77) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.executor.AbstractBatchJobExecutor.execute(AbstractBatchJobExecutor.java:139) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.rules.rewrite.RewriteCteChildren.visit(RewriteCteChildren.java:73) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.rules.rewrite.RewriteCteChildren.visit(RewriteCteChildren.java:57) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.trees.plans.visitor.PlanVisitor.visitLogicalSink(PlanVisitor.java:122) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.trees.plans.visitor.SinkVisitor.visitLogicalResultSink(SinkVisitor.java:111) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.trees.plans.logical.LogicalResultSink.accept(LogicalResultSink.java:60) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.rules.rewrite.RewriteCteChildren.rewriteRoot(RewriteCteChildren.java:68) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.rewrite.CustomRewriteJob.execute(CustomRewriteJob.java:61) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.jobs.executor.AbstractBatchJobExecutor.execute(AbstractBatchJobExecutor.java:139) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.NereidsPlanner.lambda$rewrite$6(NereidsPlanner.java:385) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.NereidsPlanner.keepOrShowPlanProcess(NereidsPlanner.java:898) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.NereidsPlanner.rewrite(NereidsPlanner.java:385) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.NereidsPlanner.planWithoutLock(NereidsPlanner.java:259) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.NereidsPlanner.planWithLock(NereidsPlanner.java:224) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.nereids.NereidsPlanner.plan(NereidsPlanner.java:145) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:853) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:626) ~[doris-fe.jar:1.2-SNAPSHOT]
...
```
### What You Expected?
no error
### How to Reproduce?
```
create table if not exists aa (
id int,
id_2 int
);
create table if not exists bb(
id int
);
create table if not exists cc (
id int
);
insert into aa values (1,2);
insert into bb values (1);
insert into cc values (1);
with tmp as (
select aa.id from
aa join bb on aa.id = bb.id
where bb.id in (select id from cc) or aa.id_2 = 1
)
select tmp.id
from
(
select id from cc
union
select id from cc
) d
join tmp on d.id = tmp.id
```
### Anything Else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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: commits-unsubscribe@doris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Bug] mark join and union will throw Input slot(s) not in child's output exception [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #56786:
URL: https://github.com/apache/doris/issues/56786#issuecomment-4218810449
We're closing this issue because it hasn't been updated in a while.
If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Bug] mark join and union will throw Input slot(s) not in child's output exception [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #56786: [Bug] mark join and union will throw Input slot(s) not in child's output exception
URL: https://github.com/apache/doris/issues/56786
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org