Class DruidVolcanoCost

java.lang.Object
org.apache.calcite.plan.volcano.DruidVolcanoCost
All Implemented Interfaces:
org.apache.calcite.plan.RelOptCost

public class DruidVolcanoCost extends Object implements org.apache.calcite.plan.RelOptCost
Druid's extension to VolcanoCost. The difference between the two is in comparing two costs. Druid's cost model gives most weightage to rowCount, then to cpuCost and then lastly ioCost.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Implementation of RelOptCostFactory that creates DruidVolcanoCosts.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.calcite.plan.RelOptCostFactory
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    divideBy(org.apache.calcite.plan.RelOptCost cost)
     
    boolean
     
    boolean
    equals(org.apache.calcite.plan.RelOptCost other)
     
    double
     
    double
     
    double
     
    int
     
    boolean
    isEqWithEpsilon(org.apache.calcite.plan.RelOptCost other)
     
    boolean
     
    boolean
    isLe(org.apache.calcite.plan.RelOptCost other)
     
    boolean
    isLt(org.apache.calcite.plan.RelOptCost other)
     
    org.apache.calcite.plan.RelOptCost
    minus(org.apache.calcite.plan.RelOptCost other)
     
    org.apache.calcite.plan.RelOptCost
    multiplyBy(double factor)
     
    org.apache.calcite.plan.RelOptCost
    plus(org.apache.calcite.plan.RelOptCost other)
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • FACTORY

      public static final org.apache.calcite.plan.RelOptCostFactory FACTORY
  • Method Details

    • getCpu

      public double getCpu()
      Specified by:
      getCpu in interface org.apache.calcite.plan.RelOptCost
    • isInfinite

      public boolean isInfinite()
      Specified by:
      isInfinite in interface org.apache.calcite.plan.RelOptCost
    • getIo

      public double getIo()
      Specified by:
      getIo in interface org.apache.calcite.plan.RelOptCost
    • isLe

      public boolean isLe(org.apache.calcite.plan.RelOptCost other)
      Specified by:
      isLe in interface org.apache.calcite.plan.RelOptCost
    • isLt

      public boolean isLt(org.apache.calcite.plan.RelOptCost other)
      Specified by:
      isLt in interface org.apache.calcite.plan.RelOptCost
    • getRows

      public double getRows()
      Specified by:
      getRows in interface org.apache.calcite.plan.RelOptCost
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(org.apache.calcite.plan.RelOptCost other)
      Specified by:
      equals in interface org.apache.calcite.plan.RelOptCost
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • isEqWithEpsilon

      public boolean isEqWithEpsilon(org.apache.calcite.plan.RelOptCost other)
      Specified by:
      isEqWithEpsilon in interface org.apache.calcite.plan.RelOptCost
    • minus

      public org.apache.calcite.plan.RelOptCost minus(org.apache.calcite.plan.RelOptCost other)
      Specified by:
      minus in interface org.apache.calcite.plan.RelOptCost
    • multiplyBy

      public org.apache.calcite.plan.RelOptCost multiplyBy(double factor)
      Specified by:
      multiplyBy in interface org.apache.calcite.plan.RelOptCost
    • divideBy

      public double divideBy(org.apache.calcite.plan.RelOptCost cost)
      Specified by:
      divideBy in interface org.apache.calcite.plan.RelOptCost
    • plus

      public org.apache.calcite.plan.RelOptCost plus(org.apache.calcite.plan.RelOptCost other)
      Specified by:
      plus in interface org.apache.calcite.plan.RelOptCost
    • toString

      public String toString()
      Specified by:
      toString in interface org.apache.calcite.plan.RelOptCost
      Overrides:
      toString in class Object