diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/SortInfo.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/SortInfo.java index 3e0703414b..05763e8d07 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/SortInfo.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/SortInfo.java @@ -21,6 +21,7 @@ package org.apache.doris.analysis; import org.apache.doris.common.TreeNode; +import org.apache.doris.thrift.TSortInfo; import com.google.common.base.Preconditions; import com.google.common.base.Predicates; @@ -136,6 +137,10 @@ public class SortInfo { return sortTupleSlotExprs; } + public void setSortTupleSlotExprs(List sortTupleSlotExprs) { + this.sortTupleSlotExprs = sortTupleSlotExprs; + } + public TupleDescriptor getSortTupleDescriptor() { return sortTupleDesc; } @@ -273,4 +278,15 @@ public class SortInfo { } return substOrderBy; } + + /** + * Convert the sort info to TSortInfo. + */ + public TSortInfo toThrift() { + TSortInfo sortInfo = new TSortInfo( + Expr.treesToThrift(orderingExprs), + isAscOrder, + nullsFirstParams); + return sortInfo; + } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java index da69c993fa..98a697db74 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java @@ -229,7 +229,6 @@ public class PhysicalPlanTranslator extends PlanOperatorVisitor ordering_exprs - 5: optional list is_asc_order // Indicates whether the imposed limit comes DEFAULT_ORDER_BY_LIMIT. 6: optional bool is_default_limit - // Indicates, for each expr, if nulls should be listed first or last. This is - // independent of is_asc_order. - 7: optional list nulls_first - // Expressions evaluated over the input row that materialize the tuple to be so - // Contains one expr per slot in the materialized tuple. - 8: optional list sort_tuple_slot_exprs } enum TAnalyticWindowType {