You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/04 22:21:26 UTC

[GitHub] [pinot] walterddr commented on a change in pull request #7695: Add pinot-query-spi

walterddr commented on a change in pull request #7695:
URL: https://github.com/apache/pinot/pull/7695#discussion_r743243317



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/common/Operator.java
##########
@@ -19,39 +19,12 @@
 package org.apache.pinot.core.common;
 
 import org.apache.pinot.core.operator.ExecutionStatistics;
-import org.apache.pinot.segment.spi.IndexSegment;
+import org.apache.pinot.query.spi.data.Block;
 import org.apache.pinot.spi.annotations.InterfaceAudience;
-import org.apache.pinot.spi.exception.EarlyTerminationException;
 
 
 @InterfaceAudience.Private
-public interface Operator<T extends Block> {
-
-  /**
-   * Get the next {@link Block}.
-   * <p>For filter operator and operators above projection phase (aggregation, selection, combine etc.), method should
-   * only be called once, and will return a non-null block.
-   * <p>For operators in projection phase (docIdSet, projection, transformExpression), method can be called multiple
-   * times, and will return non-empty block or null if no more documents available
-   *
-   * @throws EarlyTerminationException if the operator is early-terminated (interrupted) before processing the next
-   *         block of data. Operator can early terminated when the query times out, or is already satisfied.
-   */
-  T nextBlock();
-
-  /**
-   * Returns the name of the operator.
-   * NOTE: This method is called for tracing purpose. The sub-class should try to return a constant to avoid the
-   * unnecessary overhead.
-   */
-  String getOperatorName();
-
-  /**
-   * Returns the index segment associated with the operator.
-   */
-  default IndexSegment getIndexSegment() {
-    throw new UnsupportedOperationException();
-  }
+public interface Operator<T extends Block> extends org.apache.pinot.query.spi.operator.Operator<T> {
 
   /**
    * Returns the execution statistics associated with the operator. This method should be called after the operator has

Review comment:
       TODO item1:
   This is the only interface that cannot be factor out. in fact I wasn't sure if ExecutionStatistics should even be part of the Operator interface. it seems like an impl detail to me thus shouldn't be part of the SPI




-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org