Class IndexCondition

java.lang.Object
org.apache.calcite.adapter.innodb.IndexCondition

public class IndexCondition extends Object
Index condition.

Works in the following places:

  • In InnodbFilterTranslator, it is the index condition to push down according to InnodbFilter by planner rule.
  • In InnodbTableScan, it represents a full scan by a primary key or a secondary key.
  • In code generation, it indicates the storage engine which index to use and the associated condition if present.
  • Method Details

    • create

      public static IndexCondition create(String indexName, QueryType queryType, List<Object> pointQueryKey, com.alibaba.innodb.java.reader.comparator.ComparisonOperator rangeQueryLowerOp, com.alibaba.innodb.java.reader.comparator.ComparisonOperator rangeQueryUpperOp, List<Object> rangeQueryLowerKey, List<Object> rangeQueryUpperKey)
      Creates a new instance for code generation to build query parameters for underlying storage engine Innodb-java-reader.
    • getImplicitCollation

      public RelCollation getImplicitCollation()
    • withFieldNames

      public IndexCondition withFieldNames(List<String> fieldNames)
    • getIndexName

      public String getIndexName()
    • withIndexName

      public IndexCondition withIndexName(String indexName)
    • withIndexColumnNames

      public IndexCondition withIndexColumnNames(List<String> indexColumnNames)
    • getPushDownConditions

      public List<RexNode> getPushDownConditions()
    • withPushDownConditions

      public IndexCondition withPushDownConditions(List<RexNode> pushDownConditions)
    • getRemainderConditions

      public List<RexNode> getRemainderConditions()
    • withRemainderConditions

      public IndexCondition withRemainderConditions(List<RexNode> remainderConditions)
    • getQueryType

      public QueryType getQueryType()
    • withQueryType

      public IndexCondition withQueryType(QueryType queryType)
    • getPointQueryKey

      public List<Object> getPointQueryKey()
    • withPointQueryKey

      public IndexCondition withPointQueryKey(List<Object> pointQueryKey)
    • getRangeQueryLowerOp

      public com.alibaba.innodb.java.reader.comparator.ComparisonOperator getRangeQueryLowerOp()
    • withRangeQueryLowerOp

      public IndexCondition withRangeQueryLowerOp(com.alibaba.innodb.java.reader.comparator.ComparisonOperator rangeQueryLowerOp)
    • getRangeQueryUpperOp

      public com.alibaba.innodb.java.reader.comparator.ComparisonOperator getRangeQueryUpperOp()
    • withRangeQueryUpperOp

      public IndexCondition withRangeQueryUpperOp(com.alibaba.innodb.java.reader.comparator.ComparisonOperator rangeQueryUpperOp)
    • getRangeQueryLowerKey

      public List<Object> getRangeQueryLowerKey()
    • withRangeQueryLowerKey

      public IndexCondition withRangeQueryLowerKey(List<Object> rangeQueryLowerKey)
    • getRangeQueryUpperKey

      public List<Object> getRangeQueryUpperKey()
    • withRangeQueryUpperKey

      public IndexCondition withRangeQueryUpperKey(List<Object> rangeQueryUpperKey)
    • nameMatch

      public boolean nameMatch(String name)
    • toString

      public String toString()
      Overrides:
      toString in class Object