Interface BuiltInMetadata.Memory

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Double cumulativeMemoryWithinPhase()
      Returns the cumulative amount of memory, in bytes, required by the physical operator implementing this relational expression, and all other operators within the same phase, across all splits.
      java.lang.Double cumulativeMemoryWithinPhaseSplit()
      Returns the expected cumulative amount of memory, in bytes, required by the physical operator implementing this relational expression, and all operators within the same phase, within each split.
      java.lang.Double memory()
      Returns the expected amount of memory, in bytes, required by a physical operator implementing this relational expression, across all splits.
      • Methods inherited from interface org.apache.calcite.rel.metadata.Metadata

        rel
    • Method Detail

      • memory

        java.lang.Double memory()
        Returns the expected amount of memory, in bytes, required by a physical operator implementing this relational expression, across all splits.

        How much memory is used depends very much on the algorithm; for example, an implementation of Aggregate that loads all data into a hash table requires approximately rowCount * averageRowSize bytes, whereas an implementation that assumes that the input is sorted requires only averageRowSize bytes to maintain a single accumulator for each aggregate function.

      • cumulativeMemoryWithinPhase

        java.lang.Double cumulativeMemoryWithinPhase()
        Returns the cumulative amount of memory, in bytes, required by the physical operator implementing this relational expression, and all other operators within the same phase, across all splits.
        See Also:
        BuiltInMetadata.Parallelism.splitCount()
      • cumulativeMemoryWithinPhaseSplit

        java.lang.Double cumulativeMemoryWithinPhaseSplit()
        Returns the expected cumulative amount of memory, in bytes, required by the physical operator implementing this relational expression, and all operators within the same phase, within each split.

        Basic formula:

        cumulativeMemoryWithinPhaseSplit = cumulativeMemoryWithinPhase / Parallelism.splitCount