Examples of addGroups()


Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addGroups()

        if (isHaving && !AggregateSymbolCollectorVisitor.getAggregates(crit, false).isEmpty()) {
            critNode.setProperty(NodeConstants.Info.IS_HAVING, Boolean.TRUE);
        }
        // Add groups to crit node
        critNode.addGroups(GroupsUsedByElementsVisitor.getGroups(crit));
        critNode.addGroups(GroupsUsedByElementsVisitor.getGroups(critNode.getCorrelatedReferenceElements()));
        return critNode;
    }

  /**
   * Attach a grouping node at top of tree.
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addGroups()

    PlanNode groupNode = NodeFactory.getNewNode(NodeConstants.Types.GROUP);

    GroupBy groupBy = query.getGroupBy();
    if(groupBy != null) {
      groupNode.setProperty(NodeConstants.Info.GROUP_COLS, groupBy.getSymbols());
            groupNode.addGroups(GroupsUsedByElementsVisitor.getGroups(groupBy));
    }

    attachLast(groupNode, plan);
       
        // Mark in hints
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addGroups()

   
    sortNode.setProperty(NodeConstants.Info.SORT_ORDER, orderBy);
    if (orderBy.hasUnrelated()) {
      sortNode.setProperty(Info.UNRELATED_SORT, true);
    }
    sortNode.addGroups(GroupsUsedByElementsVisitor.getGroups(orderBy));

    attachLast(sortNode, plan);
    return sortNode;
  }
   
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addGroups()

  private static PlanNode attachProject(PlanNode plan, Select select) {
    PlanNode projectNode = NodeFactory.getNewNode(NodeConstants.Types.PROJECT);
    projectNode.setProperty(NodeConstants.Info.PROJECT_COLS, select.getProjectedSymbols());

    // Set groups
    projectNode.addGroups(GroupsUsedByElementsVisitor.getGroups(select));

    attachLast(projectNode, plan);
    return projectNode;
  }
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addGroups()

            for(int i=0; i<2; i++) {
                buildTree(clauses[i], node);

                // Add groups to joinNode
                for (PlanNode child : node.getChildren()) {
                    node.addGroups(child.getGroups());
                }
            }
        } else if (clause instanceof SubqueryFromClause) {
            SubqueryFromClause sfc = (SubqueryFromClause)clause;
            GroupSymbol group = sfc.getGroupSymbol();
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addGroups()

      PlanNode sourceNode = NodeEditor.findNodePreOrder(root, NodeConstants.Types.SOURCE);
      sourceNode.addFirstChild(child);
        sourceNode.setProperty(NodeConstants.Info.SYMBOL_MAP, SymbolMap.createSymbolMap(sourceNode.getGroups().iterator().next(), (List<SingleElementSymbol>)child.getFirstChild().getProperty(Info.PROJECT_COLS), metadata));
      //add a dummy access node
        PlanNode accessNode = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);
        accessNode.addGroups(child.getFirstChild().getGroups());
      child.getFirstChild().addAsParent(accessNode);
     
      new RulePushSelectCriteria().execute(root, metadata, new DefaultCapabilitiesFinder(), new RuleStack(), AnalysisRecord.createNonRecordingRecord(), cc);
      // the select node should still be above the access node
      accessNode = NodeEditor.findNodePreOrder(root, NodeConstants.Types.ACCESS);
View Full Code Here

Examples of org.teiid.query.optimizer.relational.plantree.PlanNode.addGroups()

    // Copy criteria
    Criteria crit = (Criteria) critNode.getProperty(NodeConstants.Info.SELECT_CRITERIA);
    Criteria copyCrit = (Criteria) crit.clone();
    copyNode.setProperty(NodeConstants.Info.SELECT_CRITERIA, copyCrit);
    copyNode.addGroups(critNode.getGroups());
        if(critNode.hasBooleanProperty(NodeConstants.Info.IS_DEPENDENT_SET)) {
            copyNode.setProperty(NodeConstants.Info.IS_DEPENDENT_SET, Boolean.TRUE);
        }
        if (createdNodes != null) {
          createdNodes.add(copyNode);
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder.addGroups()

        builder.addDefaultPartitioning();
        builder.addProcedures(procList);
        builder.setSecurityEnabled(securityEnabled);

        if (gi != null && gi.length > 0)
            builder.addGroups(gi);
        if (ui != null && ui.length > 0)
            builder.addUsers(ui);

        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        String retval = testDir + File.separator + "tpcc-catalogcheck-" + name + ".jar";
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder.addGroups()

        project.setSecurityEnabled(true);
        GroupInfo groups[] = new GroupInfo[] {
                new GroupInfo("foo", false, false, false, false, false, false),
                new GroupInfo("blah", false, false, false, false, false, false)
        };
        project.addGroups(groups);
        UserInfo users[] = new UserInfo[] {
                new UserInfo("john", "hugg", new String[] {"foo"}),
                new UserInfo("ryan", "betts", new String[] {"foo", "bar"}),
                new UserInfo("ariel", "weisberg", new String[] {"bar"})
        };
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder.addGroups()

                new GroupInfo("GroupWithAllProcPerm", false, false, false, false, false, true),
                new GroupInfo("GroupWithDefaultProcPerm", false, false, false, true, false, false),
                new GroupInfo("GroupWithoutDefaultProcPerm", false, false, false, false, false, false),
                new GroupInfo("GroupWithDefaultProcReadPerm", false, false, false, false, true, false)
        };
        project.addGroups(groups);
        project.setSecurityEnabled(true);

        // export disabled in community
        if (MiscUtils.isPro()) {
            project.addExport(true /*enabled*/);
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.