Class ComparisonPredicate


  • public final class ComparisonPredicate
    extends CalciteKuduPredicate
    An implementation of CalciteKuduPredicate that creates comparison KuduPredicate KuduPredicate.newComparisonPredicate(ColumnSchema, org.apache.kudu.client.KuduPredicate.ComparisonOp, Object)
    • Field Detail

      • operation

        public final org.apache.kudu.client.KuduPredicate.ComparisonOp operation
      • rightHandValue

        public final Object rightHandValue
      • columnIdx

        public final int columnIdx
    • Constructor Detail

      • ComparisonPredicate

        public ComparisonPredicate​(int columnIdx,
                                   org.apache.kudu.client.KuduPredicate.ComparisonOp operation,
                                   Object rightHandValue)
    • Method Detail

      • inListOptimizationAllowed

        public boolean inListOptimizationAllowed​(int columnIdx)
        Description copied from class: CalciteKuduPredicate
        Returns true or false if this can be considered for in list optimization.
        Overrides:
        inListOptimizationAllowed in class CalciteKuduPredicate
        Parameters:
        columnIdx - the column index in the KuduTable
        Returns:
        true if this column and predicate can be optimized into an InListPredicate
      • explainPredicate

        public String explainPredicate​(org.apache.kudu.ColumnSchema schema)
        Description copied from class: CalciteKuduPredicate
        Constructs a string used when generating the explain plan
        Specified by:
        explainPredicate in class CalciteKuduPredicate
        Parameters:
        schema - Schema of the column from Kudu
        Returns:
        Formatted string from RelWriter to use
      • toPredicate

        public org.apache.kudu.client.KuduPredicate toPredicate​(org.apache.kudu.ColumnSchema columnSchema,
                                                                boolean invertValue)
        In order to support descending ordered primary key column we invert the column value (see MutationState.getColumnValue())
        Specified by:
        toPredicate in class CalciteKuduPredicate
        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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object