Package sql.visitors.jsql

Examples of sql.visitors.jsql.SQLVisitor


   
    private static final String CONF_PATH = "../test/squall/local/";
    private NameCompGen createCG(String parserConfPath) {
        ParserMain pm = new ParserMain();
        Map map = pm.createConfig(parserConfPath);
        SQLVisitor pq = ParserUtil.parseQuery(map);
       
        NameCompGenFactory factory = new NameCompGenFactory(map, pq.getTan(), 20);
        return factory.create();
    }       
View Full Code Here


    }

    if (statement instanceof Select) {
      final Select selectStatement = (Select) statement;
      final String queryName = SystemParameters.getString(map, "DIP_QUERY_NAME");
      final SQLVisitor parsedQuery = new SQLVisitor(queryName);

      // visit whole SELECT statement
      parsedQuery.visit(selectStatement);
      parsedQuery.doneVisiting();

      return parsedQuery;
    }
    throw new RuntimeException("Please provide SELECT statement!");
  }
View Full Code Here

   * This is done on fake ComponentGenerator, so there is no computeSourcePar
   * parallelism on source components is input variable This method is
   * idempotent, no side effects, can be called multiple times.
   */
  public Map<String, Integer> computeSourcePar(int totalSourcePar) {
    final SQLVisitor pq = ParserUtil.parseQuery(_map);
    final List<Table> tableList = pq.getTableList();
    if (totalSourcePar < tableList.size())
      throw new RuntimeException(
          "There is not enought nodes such that all the sources get at least parallelism = 1");
    /*
     * We need a way to generate parallelism for all the DataSources This
View Full Code Here

       
        //create object
        String parserConfPath = "../test/squall/unit_tests/confs/0_1G_tpch7_ncl";
        ParserMain pm = new ParserMain();
        Map map = pm.createConfig(parserConfPath);
        SQLVisitor parsedQuery = ParserUtil.parseQuery(map);
        ProjGlobalCollect instance = new ProjGlobalCollect(parsedQuery.getSelectItems(), parsedQuery.getWhereExpr());
        instance.process();
       
        //getting results
        List<Expression> listExpr = instance.getExprList();
        List<OrExpression> orListExpr = instance.getOrExprs();
View Full Code Here

TOP

Related Classes of sql.visitors.jsql.SQLVisitor

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.