This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit e9064d1b947d86a1d825109a2b505ae94def3403
Author: morrySnow <[email protected]>
AuthorDate: Mon Apr 29 19:26:13 2024 +0800

    [fix](Nereids) topn should not inherit logical properties when repace child 
(#34282)
---
 .../org/apache/doris/nereids/trees/plans/logical/LogicalTopN.java  | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalTopN.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalTopN.java
index dd1c171ca2c..6def25d2427 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalTopN.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalTopN.java
@@ -137,16 +137,11 @@ public class LogicalTopN<CHILD_TYPE extends Plan> extends 
LogicalUnary<CHILD_TYP
     }
 
     public LogicalTopN<Plan> withLimitChild(long limit, long offset, Plan 
child) {
-        Preconditions.checkArgument(children.size() == 1,
-                "LogicalTopN should have 1 child, but input is %s", 
children.size());
         return new LogicalTopN<>(orderKeys, limit, offset, child);
     }
 
     public LogicalTopN<Plan> withLimitOrderKeyAndChild(long limit, long 
offset, List<OrderKey> orderKeys, Plan child) {
-        Preconditions.checkArgument(children.size() == 1,
-                "LogicalTopN should have 1 child, but input is %s", 
children.size());
-        return new LogicalTopN<>(orderKeys, limit, offset,
-                Optional.empty(), Optional.of(getLogicalProperties()), child);
+        return new LogicalTopN<>(orderKeys, limit, offset, child);
     }
 
     @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to