Interface FunctionalIndexInfo


public interface FunctionalIndexInfo
FunctionalIndexInfo is to collect Functional fields in IndexDescriptor, derive information needed for index plan, e.g. convert and rewrite filter, columns, and rowtype on index scan that involve functional index. In case different store might have different way to rename expression in index table, we allow storage plugin
  • Method Details

    • hasFunctional

      boolean hasFunctional()
      Returns:
      if this index has functional indexed field, return true
    • getIndexDesc

      IndexDescriptor getIndexDesc()
      Returns:
      the IndexDescriptor this IndexInfo built from
    • getNewPath

      SchemaPath getNewPath(SchemaPath path)
      getNewPath: for an original path, return new rename '$N' path, notice there could be multiple renamed paths if the there are multiple functional indexes refer original path.
      Parameters:
      path -
      Returns:
    • getNewPathFromExpr

      SchemaPath getNewPathFromExpr(LogicalExpression expr)
      return a plain field path if the incoming index expression 'expr' is replaced to be a plain field
      Parameters:
      expr - suppose to be an indexed expression
      Returns:
      the renamed schemapath in index table for the indexed expression
    • getPathsInFunctionExpr

      Map<LogicalExpression,Set<SchemaPath>> getPathsInFunctionExpr()
      Returns:
      the map of indexed expression --> the involved schema paths in a indexed expression
    • getExprMap

      Returns:
      the map between indexed expression and to-be-converted target expression for scan in index e.g. cast(a.b as int) -> '$0'
    • allNewSchemaPaths

      Set<SchemaPath> allNewSchemaPaths()
      Returns:
      the set of all new field names for indexed functions in index
    • allPathsInFunction

      Set<SchemaPath> allPathsInFunction()
      Returns:
      the set of all schemaPath exist in functional index fields
    • supportEqualCharConvertToLike

      boolean supportEqualCharConvertToLike()
      Whether this implementation( may be different per storage) support rewrite rewriting varchar equality expression, e.g. cast(a.b as varchar(2)) = 'ca' to LIKE expression: cast(a.b as varchar(2) LIKE 'ca%'