Class TransformOperator

    • Field Detail

      • udfReaderMemoryBudgetInMB

        protected final float udfReaderMemoryBudgetInMB
      • udfTransformerMemoryBudgetInMB

        protected final float udfTransformerMemoryBudgetInMB
      • udfCollectorMemoryBudgetInMB

        protected final float udfCollectorMemoryBudgetInMB
      • inputOperator

        protected final Operator inputOperator
      • keepNull

        protected final boolean keepNull
      • outputDataTypes

        protected java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> outputDataTypes
      • shouldIterateReadersToNextValid

        protected boolean[] shouldIterateReadersToNextValid
    • Constructor Detail

      • TransformOperator

        public TransformOperator​(OperatorContext operatorContext,
                                 Operator inputOperator,
                                 java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> inputDataTypes,
                                 java.util.Map<java.lang.String,​java.util.List<InputLocation>> inputLocations,
                                 Expression[] outputExpressions,
                                 boolean keepNull,
                                 java.time.ZoneId zoneId,
                                 TypeProvider typeProvider,
                                 boolean isAscending)
                          throws QueryProcessException,
                                 java.io.IOException
        Throws:
        QueryProcessException
        java.io.IOException
    • Method Detail

      • hasNext

        public final boolean hasNext()
        Specified by:
        hasNext in interface Operator
        Returns:
        true if the operator has more data, otherwise false
      • next

        public org.apache.iotdb.tsfile.read.common.block.TsBlock next()
        Description copied from interface: Operator
        Gets next tsBlock from this operator. If no data is currently available, return null.
        Specified by:
        next in interface Operator
      • close

        public void close()
                   throws java.lang.Exception
        Description copied from interface: Operator
        This method will always be called before releasing the Operator reference.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Operator
        Throws:
        java.lang.Exception
      • isBlocked

        public com.google.common.util.concurrent.ListenableFuture<?> isBlocked()
        Description copied from interface: Operator
        Returns a future that will be completed when the operator becomes unblocked. If the operator is not blocked, this method should return NOT_BLOCKED.
        Specified by:
        isBlocked in interface Operator
      • isFinished

        public boolean isFinished()
        Description copied from interface: Operator
        Is this operator completely finished processing and no more output TsBlock will be produced.
        Specified by:
        isFinished in interface Operator
      • calculateMaxPeekMemory

        public long calculateMaxPeekMemory()
        Description copied from interface: Operator
        We should also consider the memory used by its children operator, so the calculation logic may be like: long estimatedOfCurrentOperator = XXXXX; return max(estimatedOfCurrentOperator, child1.calculateMaxPeekMemory(), child2.calculateMaxPeekMemory(), ....)

        Each operator's MaxPeekMemory should also take retained size of each child operator into account.

        Specified by:
        calculateMaxPeekMemory in interface Operator
        Returns:
        estimated max memory footprint that the Operator Tree(rooted from this operator) will use while doing its own query processing
      • calculateMaxReturnSize

        public long calculateMaxReturnSize()
        Specified by:
        calculateMaxReturnSize in interface Operator
        Returns:
        estimated max memory footprint for returned TsBlock when calling operator.next()
      • calculateRetainedSizeAfterCallingNext

        public long calculateRetainedSizeAfterCallingNext()
        Specified by:
        calculateRetainedSizeAfterCallingNext in interface Operator
        Returns:
        each operator's retained size(including all its children's retained size) after calling its next() method