From 8a9205223ab1d1726eed077785032c1a9465855e Mon Sep 17 00:00:00 2001 From: 924060929 Date: Tue, 3 Feb 2026 11:01:34 +0800 Subject: [PATCH] [fix](query cache) AggregateNode compute digest of query cache should consider sortByGroupKey (#60431) AggregateNode compute digest of query cache should consider sortByGroupKey --- .../main/java/org/apache/doris/planner/AggregationNode.java | 3 +++ gensrc/thrift/Normalization.thrift | 1 + 2 files changed, 4 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java index 30730bf39fefa9..de190387d59052 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java @@ -177,6 +177,9 @@ public void normalize(TNormalizedPlanNode normalizedPlan, Normalizer normalizer) normalizedPlan.setNodeType(TPlanNodeType.AGGREGATION_NODE); normalizedPlan.setAggregationNode(normalizedAggregateNode); + if (sortByGroupKey != null) { + normalizedAggregateNode.setSortInfo(sortByGroupKey.toThrift()); + } } @Override diff --git a/gensrc/thrift/Normalization.thrift b/gensrc/thrift/Normalization.thrift index 1eedfef6fbee97..71899a4088ff61 100644 --- a/gensrc/thrift/Normalization.thrift +++ b/gensrc/thrift/Normalization.thrift @@ -44,6 +44,7 @@ struct TNormalizedAggregateNode { 6: optional bool use_streaming_preaggregation 7: optional list projectToAggIntermediateTuple 8: optional list projectToAggOutputTuple + 9: optional PlanNodes.TSortInfo sortInfo } struct TNormalizedPlanNode {