Class NodeStats
- java.lang.Object
-
- org.apache.beam.sdk.extensions.sql.impl.planner.NodeStats
-
public abstract class NodeStats extends java.lang.ObjectThis is a utility class to represent rowCount, rate and window.
-
-
Constructor Summary
Constructors Constructor Description NodeStats()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static NodeStatscreate(double rowCount)It creates an instance with rate=0 and window=rowCount for bounded sources.static NodeStatscreate(double rowCount, double rate, double window)abstract doublegetRate()abstract doublegetRowCount()abstract doublegetWindow()This method returns the number of tuples in each window.booleanisUnknown()If any of the values for rowCount, rate or window is infinite, it returns true.NodeStatsminus(NodeStats that)NodeStatsmultiply(double factor)NodeStatsplus(NodeStats that)
-
-
-
Field Detail
-
UNKNOWN
public static final NodeStats UNKNOWN
Returns an instance with all values set to INFINITY. This will be only used when the node is not a BeamRelNode and we don't have an estimation implementation for it in the metadata handler. In this case we return INFINITE and it will be propagated up in the estimates.
-
-
Method Detail
-
getRowCount
public abstract double getRowCount()
-
getRate
public abstract double getRate()
-
getWindow
public abstract double getWindow()
This method returns the number of tuples in each window. It is different than the windowing notion of Beam.
-
create
public static NodeStats create(double rowCount, double rate, double window)
-
create
public static NodeStats create(double rowCount)
It creates an instance with rate=0 and window=rowCount for bounded sources.
-
isUnknown
public boolean isUnknown()
If any of the values for rowCount, rate or window is infinite, it returns true.
-
multiply
public NodeStats multiply(double factor)
-
-