Package org.eigenbase.util.mapping

Examples of org.eigenbase.util.mapping.Mapping


        RelMetadataQuery.getPulledUpPredicates(child);

    List<RexNode> projectPullUpPredicates = new ArrayList<RexNode>();

    BitSet columnsMapped = new BitSet(child.getRowType().getFieldCount());
    Mapping m = Mappings.create(MappingType.PARTIAL_FUNCTION,
        child.getRowType().getFieldCount(),
        project.getRowType().getFieldCount());

    for (Ord<RexNode> o : Ord.zip(project.getProjects())) {
      if (o.e instanceof RexInputRef) {
        int sIdx = ((RexInputRef) o.e).getIndex();
        m.set(sIdx, o.i);
        columnsMapped.set(sIdx);
      }
    }

    // Go over childPullUpPredicates. If a predicate only contains columns in
View Full Code Here


        RelMetadataQuery.getPulledUpPredicates(child);

    List<RexNode> aggPullUpPredicates = new ArrayList<RexNode>();

    BitSet groupKeys = agg.getGroupSet();
    Mapping m = Mappings.create(MappingType.PARTIAL_FUNCTION,
        child.getRowType().getFieldCount(), agg.getRowType().getFieldCount());

    int i = 0;
    for (int j : BitSets.toIter(groupKeys)) {
      m.set(j, i++);
    }

    for (RexNode r : childInfo.pulledUpPredicates) {
      BitSet rCols = RelOptUtil.InputFinder.bits(r);
      if (BitSets.contains(groupKeys, rCols)) {
View Full Code Here

        RelMetadataQuery.getPulledUpPredicates(child);

    List<RexNode> projectPullUpPredicates = new ArrayList<RexNode>();

    BitSet columnsMapped = new BitSet(child.getRowType().getFieldCount());
    Mapping m = Mappings.create(MappingType.PARTIAL_FUNCTION,
        child.getRowType().getFieldCount(),
        project.getRowType().getFieldCount());

    for (Ord<RexNode> o : Ord.zip(project.getProjects())) {
      if (o.e instanceof RexInputRef) {
        int sIdx = ((RexInputRef) o.e).getIndex();
        m.set(sIdx, o.i);
        columnsMapped.set(sIdx);
      }
    }

    // Go over childPullUpPredicates. If a predicate only contains columns in
View Full Code Here

        RelMetadataQuery.getPulledUpPredicates(child);

    List<RexNode> aggPullUpPredicates = new ArrayList<RexNode>();

    BitSet groupKeys = agg.getGroupSet();
    Mapping m = Mappings.create(MappingType.PARTIAL_FUNCTION,
        child.getRowType().getFieldCount(), agg.getRowType().getFieldCount());

    int i = 0;
    for (int j : BitSets.toIter(groupKeys)) {
      m.set(j, i++);
    }

    for (RexNode r : childInfo.pulledUpPredicates) {
      BitSet rCols = RelOptUtil.InputFinder.bits(r);
      if (BitSets.contains(groupKeys, rCols)) {
View Full Code Here

TOP

Related Classes of org.eigenbase.util.mapping.Mapping

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.