Package org.eigenbase.rel

Examples of org.eigenbase.rel.Correlation


          SortedMap<Correlation, Integer> childMapCorVarToOutputPos =
              mapNewRelToMapCorVarToOutputPos.get(newInputRel);

          if (childMapCorVarToOutputPos != null) {
            // try to find in this input rel the position of cor var
            Correlation corVar = cm.mapFieldAccessToCorVar.get(fieldAccess);

            if (corVar != null) {
              newInputPos = childMapCorVarToOutputPos.get(corVar);
              if (newInputPos != null) {
                // this input rel does produce the cor var
View Full Code Here


    // override RexShuttle
    public RexNode visitFieldAccess(RexFieldAccess fieldAccess) {
      if (cm.mapFieldAccessToCorVar.containsKey(fieldAccess)) {
        // if it is a corVar, change it to be input ref.
        Correlation corVar = cm.mapFieldAccessToCorVar.get(fieldAccess);

        // corVar offset should point to the leftInput of currentRel,
        // which is the CorrelatorRel.
        RexNode newRexNode =
            new RexInputRef(corVar.getOffset(), fieldAccess.getType());

        if (projectPulledAboveLeftCorrelator
            && (nullIndicator != null)) {
          // need to enforce nullability by applying an additional
          // cast operator over the transformed expression.
View Full Code Here

            @Override
            public Void visitFieldAccess(RexFieldAccess fieldAccess) {
              final RexNode ref = fieldAccess.getReferenceExpr();
              if (ref instanceof RexCorrelVariable) {
                final RexCorrelVariable var = (RexCorrelVariable) ref;
                final Correlation correlation =
                    mapNameToCorVar.get(var.getName());
                mapFieldAccessToCorVar.put(fieldAccess, correlation);
                mapRefRelToCorVar.put(rel, correlation);
              }
              return super.visitFieldAccess(fieldAccess);
View Full Code Here

          SortedMap<Correlation, Integer> childMapCorVarToOutputPos =
              mapNewRelToMapCorVarToOutputPos.get(newInputRel);

          if (childMapCorVarToOutputPos != null) {
            // try to find in this input rel the position of cor var
            Correlation corVar = cm.mapFieldAccessToCorVar.get(fieldAccess);

            if (corVar != null) {
              newInputPos = childMapCorVarToOutputPos.get(corVar);
              if (newInputPos != null) {
                // this input rel does produce the cor var
View Full Code Here

    // override RexShuttle
    public RexNode visitFieldAccess(RexFieldAccess fieldAccess) {
      if (cm.mapFieldAccessToCorVar.containsKey(fieldAccess)) {
        // if it is a corVar, change it to be input ref.
        Correlation corVar = cm.mapFieldAccessToCorVar.get(fieldAccess);

        // corVar offset should point to the leftInput of currentRel,
        // which is the CorrelatorRel.
        RexNode newRexNode =
            new RexInputRef(corVar.getOffset(), fieldAccess.getType());

        if (projectPulledAboveLeftCorrelator
            && (nullIndicator != null)) {
          // need to enforce nullability by applying an additional
          // cast operator over the transformed expression.
View Full Code Here

            @Override
            public Void visitFieldAccess(RexFieldAccess fieldAccess) {
              final RexNode ref = fieldAccess.getReferenceExpr();
              if (ref instanceof RexCorrelVariable) {
                final RexCorrelVariable var = (RexCorrelVariable) ref;
                final Correlation correlation =
                    mapNameToCorVar.get(var.getName());
                mapFieldAccessToCorVar.put(fieldAccess, correlation);
                mapRefRelToCorVar.put(rel, correlation);
              }
              return super.visitFieldAccess(fieldAccess);
View Full Code Here

TOP

Related Classes of org.eigenbase.rel.Correlation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.