kangkaisen commented on issue #4772:
URL:
https://github.com/apache/incubator-doris/issues/4772#issuecomment-716494100
I forget to submit a PR to the Github master branch.
You could change the code to, and submit a PR.
```
if (analyzer.hasEmptyResultSet()) {
List<TupleId> scanTupleIds = root.getAllScanTupleIds();
PlanNode node = createEmptyNode(stmt, analyzer);
// Ensure result exprs will be substituted by right outputSmap
node.setOutputSmap(root.outputSmap);
// Must and could only remove the scanNode that the tuple id is
same with EmptyNode,
// otherwise we will get NPE in
Coordinator::computeScanRangeAssignment
scanNodes.removeIf(scanNode ->
scanTupleIds.contains(scanNode.getTupleIds().get(0)));
// Currently, getMaterializedTupleIds for AnalyticEvalNode is
wrong,
// So we explicitly add AnalyticEvalNode tuple ids to
EmptySetNode
if (root instanceof AnalyticEvalNode) {
node.getTupleIds().addAll(root.tupleIds);
}
return node;
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]