morrySnow commented on code in PR #16797:
URL: https://github.com/apache/doris/pull/16797#discussion_r1126272738


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalLimit.java:
##########
@@ -70,14 +72,16 @@ public PhysicalLimit(long limit, long offset,
      *
      * @param limit the number of tuples retrieved.
      * @param offset the number of tuples skipped.
+     * @param phase the phase of 2-phase limit.
      */
     public PhysicalLimit(long limit, long offset, Optional<GroupExpression> 
groupExpression,
             LogicalProperties logicalProperties, PhysicalProperties 
physicalProperties,
-            StatsDeriveResult statsDeriveResult, CHILD_TYPE child) {
+            StatsDeriveResult statsDeriveResult, CHILD_TYPE child, LimitPhase 
phase) {

Review Comment:
   do not put phase in the last



##########
fe/fe-core/src/test/java/org/apache/doris/rewrite/SplitLimit.java:
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.rewrite;
+
+import org.apache.doris.catalog.PrimitiveType;
+import org.apache.doris.nereids.trees.plans.Plan;
+import org.apache.doris.nereids.trees.plans.logical.LogicalLimit;
+import org.apache.doris.nereids.util.PlanChecker;
+import org.apache.doris.utframe.TestWithFeService;
+
+import org.junit.jupiter.api.Test;
+
+public class SplitLimit extends TestWithFeService {

Review Comment:
   start a mock service is very heavy, so it is better to use PlanChecker to do 
rule UT



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to