Examples of QueryContext


Examples of org.apache.tajo.engine.query.QueryContext

  private MasterPlan buildPlan(String sql) throws PlanningException, IOException {
    Expr expr = sqlAnalyzer.parse(sql);
    LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), expr);
    optimizer.optimize(plan);
    QueryContext context = new QueryContext();
    MasterPlan masterPlan = new MasterPlan(LocalTajoTestingUtility.newQueryId(), context, plan);
    globalPlanner.build(masterPlan);
    return masterPlan;
  }
View Full Code Here

Examples of org.apache.tajo.engine.query.QueryContext

    LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), expr);

    optimizer.optimize(plan);

    QueryId queryId = QueryIdFactory.newQueryId(System.currentTimeMillis(), 0);
    QueryContext queryContext = new QueryContext();
    MasterPlan masterPlan = new MasterPlan(queryId, queryContext, plan);
    GlobalPlanner globalPlanner = new GlobalPlanner(conf, catalog);
    globalPlanner.build(masterPlan);

    /*
 
View Full Code Here

Examples of org.apache.tajo.engine.query.QueryContext

    LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), expr);

    optimizer.optimize(plan);

    QueryId queryId = QueryIdFactory.newQueryId(System.currentTimeMillis(), 0);
    QueryContext queryContext = new QueryContext();
    MasterPlan masterPlan = new MasterPlan(queryId, queryContext, plan);
    GlobalPlanner globalPlanner = new GlobalPlanner(conf, catalog);
    globalPlanner.build(masterPlan);

    ExecutionBlockCursor ebCursor = new ExecutionBlockCursor(masterPlan);
View Full Code Here

Examples of org.apache.tajo.engine.query.QueryContext

    LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), expr);

    optimizer.optimize(plan);

    QueryId queryId = QueryIdFactory.newQueryId(System.currentTimeMillis(), 0);
    QueryContext queryContext = new QueryContext();
    MasterPlan masterPlan = new MasterPlan(queryId, queryContext, plan);
    GlobalPlanner globalPlanner = new GlobalPlanner(conf, catalog);
    globalPlanner.build(masterPlan);

    /*
 
View Full Code Here

Examples of org.apache.tajo.engine.query.QueryContext

    LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), expr);

    optimizer.optimize(plan);

    QueryId queryId = QueryIdFactory.newQueryId(System.currentTimeMillis(), 0);
    QueryContext queryContext = new QueryContext();
    MasterPlan masterPlan = new MasterPlan(queryId, queryContext, plan);
    GlobalPlanner globalPlanner = new GlobalPlanner(conf, catalog);
    globalPlanner.build(masterPlan);

    /*
 
View Full Code Here

Examples of org.apache.tajo.engine.query.QueryContext

    LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), expr);

    optimizer.optimize(plan);

    QueryId queryId = QueryIdFactory.newQueryId(System.currentTimeMillis(), 0);
    QueryContext queryContext = new QueryContext();
    MasterPlan masterPlan = new MasterPlan(queryId, queryContext, plan);
    GlobalPlanner globalPlanner = new GlobalPlanner(conf, catalog);
    globalPlanner.build(masterPlan);

    /*
 
View Full Code Here

Examples of org.atomojo.app.db.sparql.QueryContext

         Parser parser = new Parser(getLogger());
         Query query = parser.parseQuery(r);
         r.close();

         getResponse().setStatus(Status.SUCCESS_OK);
         final QueryContext context = new QueryContext(getLogger(),app.getDB(),query);
         final XMLRepresentationParser xmlParser = new XMLRepresentationParser();
         return new OutputRepresentation(MediaType.APPLICATION_ATOM) {
            public void write(OutputStream os)
               throws IOException
            {
               final ItemDestination dest = new WriterItemDestination(new OutputStreamWriter(os,"UTF-8"),"UTF-8");
               final ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
               try {
                  context.execute(new QueryContext.ResultListener() {
                     DocumentLoader loader = new SAXDocumentLoader();
                     public void onStart() throws QueryException {
                        try {
                           dest.send(constructor.createDocument());
                           dest.send(constructor.createElement(AtomResource.FEED_NAME));
View Full Code Here

Examples of org.jboss.dna.graph.query.QueryContext

             * @see org.jboss.dna.graph.Graph.BuildQuery#execute()
             */
            public QueryResults execute() {
                Batch batch = batch();
                TypeSystem typeSystem = getContext().getValueFactories().getTypeSystem();
                QueryContext context = new GraphQueryContext(schemata, typeSystem, hints, problems, variables, batch);
                QueryEngine engine = getQueryEngine();
                return engine.execute(context, query);
            }
        };
    }
View Full Code Here

Examples of org.jboss.dna.graph.query.QueryContext

                added = false;
                Set<SelectorName> viewNames = new HashSet<SelectorName>(definitions.keySet());
                for (SelectorName name : viewNames) {
                    QueryCommand command = definitions.get(name);
                    // Create the canonical plan for the definition ...
                    QueryContext queryContext = new QueryContext(schemata, typeSystem);
                    CanonicalPlanner planner = new CanonicalPlanner();
                    PlanNode plan = planner.createPlan(queryContext, command);
                    if (queryContext.getProblems().hasErrors()) {
                        continue;
                    }

                    // Get the columns from the top-level PROJECT ...
                    PlanNode project = plan.findAtOrBelow(Type.PROJECT);
View Full Code Here

Examples of org.kie.internal.query.QueryContext

    }
  
    public void fillProcessDefinitionList(String deploymentId, int [] pageInfo, int maxNumResults, List<JaxbProcessDefinition> procDefList) {
        List<String> processIdList = Collections.EMPTY_LIST;
        try {
            processIdList = new ArrayList<String>(runtimeDataService.getProcessIds(deploymentId, new QueryContext(pageInfo[0], pageInfo[1])));
            Collections.sort(processIdList);
        } catch( Exception e) {
            // possibly because the deployment is being modified and not fully un/deployed.. (un/deploy*ing*)
            logger.debug( "Unable to retrieve process ids for deployment '{}': {}", deploymentId, e.getMessage(), e);
        }
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.