This is an automated email from the ASF dual-hosted git repository.
starocean999 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 612347f650e [fix](planner)sort node should materialized required slots
for itself (#27605)
612347f650e is described below
commit 612347f650e0d637f7e3f2441fd578bd9853cf2e
Author: starocean999 <[email protected]>
AuthorDate: Mon Nov 27 15:37:11 2023 +0800
[fix](planner)sort node should materialized required slots for itself
(#27605)
this is a follow up pr for #27526 . The old pr didn't fix the problem
correctly, this pr do.
---
.../src/main/java/org/apache/doris/planner/JoinNodeBase.java | 3 ---
fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java | 7 +++++++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/JoinNodeBase.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/JoinNodeBase.java
index 2a0a272e488..b635cfda59d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/JoinNodeBase.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/JoinNodeBase.java
@@ -275,9 +275,6 @@ public abstract class JoinNodeBase extends PlanNode {
SlotId firstMaterializedSlotId = null;
for (TupleDescriptor tupleDescriptor : outputTupleDescList) {
for (SlotDescriptor slotDescriptor : tupleDescriptor.getSlots()) {
- if ((requiredSlotIdSet != null &&
requiredSlotIdSet.contains(slotDescriptor.getId()))) {
- slotDescriptor.setIsMaterialized(true);
- }
if (slotDescriptor.isMaterialized()) {
if ((requiredSlotIdSet == null ||
requiredSlotIdSet.contains(slotDescriptor.getId()))) {
outputSlotIds.add(slotDescriptor.getId());
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java
index 70b76fa07b7..375e37edd8f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java
@@ -269,6 +269,13 @@ public class SortNode extends PlanNode {
Expr.getIds(info.getOrderingExprs(), null, ids);
}
+ @Override
+ public void initOutputSlotIds(Set<SlotId> requiredSlotIdSet, Analyzer
analyzer) {
+ // need call materializeRequiredSlots again to make sure required
slots is materialized by children
+ // requiredSlotIdSet parameter means nothing for sort node, just call
materializeRequiredSlots is enough
+ info.materializeRequiredSlots(analyzer, outputSmap);
+ }
+
private void removeUnusedExprs() {
if (!isUnusedExprRemoved) {
if (resolvedTupleExprs != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]