Class RelOptQuery


  • public class RelOptQuery
    extends java.lang.Object
    A RelOptQuery represents a set of relational expressions which derive from the same select statement.
    • Field Detail

      • CORREL_PREFIX

        public static final java.lang.String CORREL_PREFIX
        Prefix to the name of correlating variables.
        See Also:
        Constant Field Values
      • mapCorrelToRel

        final java.util.Map<java.lang.String,​RelNode> mapCorrelToRel
        Maps name of correlating variable (e.g. "$cor3") to the RelNode which implements it.
      • nextCorrel

        final java.util.concurrent.atomic.AtomicInteger nextCorrel
    • Constructor Detail

      • RelOptQuery

        @Deprecated
        public RelOptQuery​(RelOptPlanner planner)
        Deprecated.
        Creates a query.
        Parameters:
        planner - Planner
      • RelOptQuery

        RelOptQuery​(RelOptPlanner planner,
                    java.util.concurrent.atomic.AtomicInteger nextCorrel,
                    java.util.Map<java.lang.String,​RelNode> mapCorrelToRel)
        For use by RelOptCluster only.
    • Method Detail

      • getCorrelOrdinal

        @Deprecated
        public static int getCorrelOrdinal​(java.lang.String correlName)
        Deprecated.
        Converts a correlating variable name into an ordinal, unique within the query.
        Parameters:
        correlName - Name of correlating variable
        Returns:
        Correlating variable ordinal
      • createCluster

        @Deprecated
        public RelOptCluster createCluster​(RelDataTypeFactory typeFactory,
                                           RexBuilder rexBuilder)
        Deprecated.
        Creates a cluster.
        Parameters:
        typeFactory - Type factory
        rexBuilder - Expression builder
        Returns:
        New cluster
      • createCorrel

        @Deprecated
        public java.lang.String createCorrel()
        Constructs a new name for a correlating variable. It is unique within the whole query.
      • lookupCorrel

        public RelNode lookupCorrel​(java.lang.String name)
        Returns the relational expression which populates a correlating variable.
      • mapCorrel

        public void mapCorrel​(java.lang.String name,
                              RelNode rel)
        Maps a correlating variable to a RelNode.