Interface BuiltInMetadata.Memory

All Superinterfaces:
Metadata
Enclosing class:
BuiltInMetadata

public static interface BuiltInMetadata.Memory extends Metadata
Metadata about the memory use of an operator.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Handler API.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Double
    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.
    @Nullable Double
    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.
    @Nullable Double
    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
  • Field Details

  • Method Details

    • memory

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

      @Nullable 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:
    • cumulativeMemoryWithinPhaseSplit

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