924060929 commented on code in PR #54822:
URL: https://github.com/apache/doris/pull/54822#discussion_r2281461183


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundBlackholeSink.java:
##########
@@ -0,0 +1,94 @@
+// 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.nereids.analyzer;
+
+import org.apache.doris.nereids.exceptions.UnboundException;
+import org.apache.doris.nereids.memo.GroupExpression;
+import org.apache.doris.nereids.properties.LogicalProperties;
+import org.apache.doris.nereids.trees.expressions.NamedExpression;
+import org.apache.doris.nereids.trees.expressions.Slot;
+import org.apache.doris.nereids.trees.plans.BlockFuncDepsPropagation;
+import org.apache.doris.nereids.trees.plans.Plan;
+import org.apache.doris.nereids.trees.plans.PlanType;
+import org.apache.doris.nereids.trees.plans.algebra.Sink;
+import org.apache.doris.nereids.trees.plans.logical.LogicalSink;
+import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
+import org.apache.doris.nereids.util.Utils;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableList;
+
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Unbound black hole sink.
+ * The blackhole sink is currently used in "warm up select" SQL statements to 
preload file block caches into tables.
+ * It is planned as a terminal sink (like /dev/null),
+ * meaning a "black hole" at the end of the execution plan that discards all 
incoming data.
+ */
+public class UnboundBlackholeSink<CHILD_TYPE extends Plan> extends 
LogicalSink<CHILD_TYPE>

Review Comment:
   I suggest use `WarmUp` to replace `Blackhole`, because confuse it with 
`dry_run`



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -8466,6 +8467,74 @@ public LogicalPlan 
visitWarmUpCluster(DorisParser.WarmUpClusterContext ctx) {
         return new WarmUpClusterCommand(warmUpItems, srcCluster, dstCluster, 
isForce, isWarmUpWithTable, properties);
     }
 
+    @Override
+    public LogicalPlan visitWarmUpSelect(DorisParser.WarmUpSelectContext ctx) {
+        LogicalPlan relation;
+        if (ctx.warmUpSingleTableRef() == null) {
+            throw new AnalysisException("WARM UP SELECT requires a table 
reference to warm up.");

Review Comment:
   `ctx.warmUpSingleTableRef()` must not null



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