java.lang.Object
org.apache.beam.sdk.extensions.sql.impl.planner.NodeStats

public abstract class NodeStats extends Object
This is a utility class to represent rowCount, rate and window.
  • Field Details

    • 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.
  • Constructor Details

    • NodeStats

      public NodeStats()
  • Method Details

    • 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)
    • plus

      public NodeStats plus(NodeStats that)
    • minus

      public NodeStats minus(NodeStats that)