Class CalciteKuduPredicate

java.lang.Object
com.twilio.kudu.sql.CalciteKuduPredicate
Direct Known Subclasses:
ComparisonPredicate, InListPredicate, NullPredicate

public abstract class CalciteKuduPredicate extends Object
A simple "case" class / POJO to help with code generation in KuduToEnumerableConverter. Simplifies the Expression generation so it is more readable
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
    explainPredicate(org.apache.kudu.ColumnSchema columnSchema)
    Constructs a string used when generating the explain plan
    abstract int
    returns the column index for this predicate
    boolean
    Returns true or false if this can be considered for in list optimization.
    protected org.apache.kudu.client.KuduPredicate.ComparisonOp
    invertComparisonOp(org.apache.kudu.client.KuduPredicate.ComparisonOp currentOp)
     
    org.apache.kudu.client.KuduPredicate
    toPredicate(CalciteKuduTable calciteKuduTable)
    Transforms this POJO into a proper KuduPredicate
    abstract org.apache.kudu.client.KuduPredicate
    toPredicate(org.apache.kudu.ColumnSchema columnSchema, boolean invertValue)
    Transforms this POJO into a proper KuduPredicate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CalciteKuduPredicate

      public CalciteKuduPredicate()
  • Method Details

    • toPredicate

      public abstract org.apache.kudu.client.KuduPredicate toPredicate(org.apache.kudu.ColumnSchema columnSchema, boolean invertValue)
      Transforms this POJO into a proper KuduPredicate
      Parameters:
      columnSchema - column schema to use for the predicate
      invertValue - true if the column is stored in descending order
      Returns:
      KuduPredicate that represents this POJO
    • getColumnIdx

      public abstract int getColumnIdx()
      returns the column index for this predicate
      Returns:
      integer of the column in Kudu
    • explainPredicate

      public abstract String explainPredicate(org.apache.kudu.ColumnSchema columnSchema)
      Constructs a string used when generating the explain plan
      Parameters:
      columnSchema - Schema of the column from Kudu
      Returns:
      Formatted string from RelWriter to use
    • inListOptimizationAllowed

      public boolean inListOptimizationAllowed(int columnIdx)
      Returns true or false if this can be considered for in list optimization.
      Parameters:
      columnIdx - the column index in the KuduTable
      Returns:
      true if this column and predicate can be optimized into an InListPredicate
    • toPredicate

      public org.apache.kudu.client.KuduPredicate toPredicate(CalciteKuduTable calciteKuduTable)
      Transforms this POJO into a proper KuduPredicate
      Parameters:
      calciteKuduTable - table to use to generate predicate
      Returns:
      KuduPredicate that represents this POJO
    • invertComparisonOp

      protected org.apache.kudu.client.KuduPredicate.ComparisonOp invertComparisonOp(org.apache.kudu.client.KuduPredicate.ComparisonOp currentOp)