Package com.alibaba.wasp.plan.parser

Examples of com.alibaba.wasp.plan.parser.WaspParser


    context.setGenWholePlan(false);
    conf.setClass(FConstants.REDO_IMPL, MemRedoLog.class, Redo.class);
    DruidDQLParser dqlParser = new DruidDQLParser(conf, null);
    DruidDDLParser ddlParser = new DruidDDLParser(conf);
    DruidDMLParser dmlParser = new DruidDMLParser(conf, null);
    druidParser = new WaspParser(ddlParser, dqlParser, dmlParser);
    MemFMetaStore fmetaServices = new MemFMetaStore();
    TableSchemaCacheReader reader = TableSchemaCacheReader.getInstance(conf,
        fmetaServices);
    reader.clearCache();
    context.setTsr(reader);
View Full Code Here


    ParseContext context = new ParseContext();
    context.setTsr(reader);
    DruidDQLParser dqlParser = new DruidDQLParser(conf, null);
    DruidDDLParser ddlParser = new DruidDDLParser(conf);
    DruidDMLParser dmlParser = new DruidDMLParser(conf, null);
    WaspParser druidParser = new WaspParser(ddlParser, dqlParser, dmlParser);

    loadTable(context, druidParser.getDruidDDLParser(), fmetaServices);

  }
View Full Code Here

    MemFMetaStore fmetaServices = new MemFMetaStore();
    reader = TableSchemaCacheReader.getInstance(conf, fmetaServices);
    context.setTsr(reader);
    fmetaServices.close();
    if (druidParser == null) {
      druidParser = new WaspParser();
      druidParser.setConf(conf);
    }
    reader.clearCache();
    DruidParserTestUtil.loadTable(context, druidParser.getDruidDDLParser(),
        fmetaServices);
View Full Code Here

    conf = TEST_UTIL.getConfiguration();
    context.setGenWholePlan(false);
    DruidDQLParser dqlParser = new DruidDQLParser(conf);
    DruidDDLParser ddlParser = new DruidDDLParser(conf);
    DruidDMLParser dmlParser = new DruidDMLParser(conf);
    druidParser = new WaspParser(ddlParser, dqlParser, dmlParser);
    TableSchemaCacheReader reader = TableSchemaCacheReader.getInstance(conf);
    reader.clearCache();
    context.setTsr(reader);
    // create table
    table = new FTable[DruidParserTestUtil.SEED.length];
View Full Code Here

    conf = TEST_UTIL.getConfiguration();
    context.setGenWholePlan(false);
    DruidDQLParser dqlParser = new DruidDQLParser(conf, null);
    DruidDDLParser ddlParser = new DruidDDLParser(conf);
    DruidDMLParser dmlParser = new DruidDMLParser(conf, null);
    druidParser = new WaspParser(ddlParser, dqlParser, dmlParser);
    TableSchemaCacheReader reader = TableSchemaCacheReader.getInstance(conf);
    reader.clearCache();
    context.setTsr(reader);
    // create table
    table = new FTable[DruidParserTestUtil.SEED.length];
View Full Code Here

      context.setTsr(reader);

      DruidDQLParser dqlParser = new DruidDQLParser(conf, null);
      DruidDDLParser ddlParser = new DruidDDLParser(conf);
      DruidDMLParser dmlParser = new DruidDMLParser(conf, null);
      WaspParser druidParser = new WaspParser(ddlParser, dqlParser, dmlParser);

      // create table
      context.setSql(createTable);
      druidParser.generatePlan(context);
      Plan plan = context.getPlan();
      if (plan instanceof CreateTablePlan) {
        CreateTablePlan createPlan = (CreateTablePlan) plan;
        FTable table = createPlan.getTable();
        TableSchemaCacheReader.getService(conf).createTable(table);
      }
      // insert
      context.setSql(insert);
      druidParser.generatePlan(context);
      plan = context.getPlan();
      if (plan instanceof InsertPlan) {
        InsertPlan insertPlan = (InsertPlan) plan;
        List<InsertAction> actions = insertPlan.getActions();
        Assert.assertEquals(actions.size(), 1);
View Full Code Here

      context.setTsr(reader);

      DruidDQLParser dqlParser = new DruidDQLParser(conf, null);
      DruidDDLParser ddlParser = new DruidDDLParser(conf);
      DruidDMLParser dmlParser = new DruidDMLParser(conf, null);
      WaspParser druidParser = new WaspParser(ddlParser, dqlParser, dmlParser);

      DruidParserTestUtil.loadTable(context, druidParser.getDruidDDLParser(),
          fmetaServices);

      DMLTransactionPlan transactionPlan = getTransactionPlan(druidParser);
      List<TransactionAction> actions = transactionPlan.getActions();
      Assert.assertEquals(actions.size(), 1);
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.plan.parser.WaspParser

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.