gianm commented on code in PR #18144:
URL: https://github.com/apache/druid/pull/18144#discussion_r2150946546


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ExecutionContext.java:
##########
@@ -0,0 +1,107 @@
+/*
+ * 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.druid.msq.exec;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import org.apache.druid.frame.channel.BlockingQueueFrameChannel;
+import org.apache.druid.frame.key.ClusterByPartitions;
+import org.apache.druid.frame.processor.FrameProcessorExecutor;
+import org.apache.druid.frame.processor.OutputChannelFactory;
+import org.apache.druid.msq.counters.CounterTracker;
+import org.apache.druid.msq.exec.std.StandardShuffleOperations;
+import org.apache.druid.msq.input.InputSliceReader;
+import org.apache.druid.msq.kernel.ShuffleKind;
+import org.apache.druid.msq.kernel.WorkOrder;
+import org.apache.druid.msq.statistics.ClusterByStatisticsSnapshot;
+
+import javax.annotation.Nullable;
+
+/**
+ * All the things needed for {@link StageProcessor#execute(ExecutionContext)} 
to run the work for a stage.
+ */
+public interface ExecutionContext

Review Comment:
   I suppose these could be collapsed. I don't currently have plans to create 
other implementations. I had a couple reasons for doing an interface:
   
   - I thought it would be easier for developers of `StageProcessor` to 
understand what they get for `execute` if they could read an interface, rather 
than a concrete class. The code for a concrete class has a bunch of incidental 
implementation stuff in it that isn't necessarily helpful to its user.
   - I thought it might be useful for testing to have the interface and 
concrete class be separate things. Although, I didn't end up taking advantage 
of this. I suppose tests could use mocks too.
   
   I left this as is, because IMO the interface approach is cleaner, but it's 
kind of borderline so I could go either way.



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