Package org.apache.calcite.rel.metadata
Interface BuiltInMetadata.Memory
-
- All Superinterfaces:
Metadata
- All Known Subinterfaces:
BuiltInMetadata.All
- 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
BuiltInMetadata.Memory.Handler
Handler API.
-
Field Summary
Fields Modifier and Type Field Description static MetadataDef<BuiltInMetadata.Memory>
DEF
-
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.
-
-
-
Field Detail
-
DEF
static final MetadataDef<BuiltInMetadata.Memory> DEF
-
-
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 approximatelyrowCount * averageRowSize
bytes, whereas an implementation that assumes that the input is sorted requires onlyaverageRowSize
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
-
-