コード例 #1
0
  private void analyzeSelectStatement() throws SemanticAnalyzerException {
    SemanticAnalyzer selectAnalzyer =
        SemanticAnalyzerFactory.createAnalyzer(insertContext.getSelect(), getAllSchemas());

    if (selectAnalzyer instanceof SelectStatementAnalyzer) {
      ((SelectStatementAnalyzer) selectAnalzyer).setOutputStreamName(context.getOutputStreamName());
    }

    context.setSelectContext((SelectAnalyzeContext) selectAnalzyer.analyze());
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public AnalyzeContext analyze() throws SemanticAnalyzerException {
    String streamName = insertContext.getStreamName();
    context.setOutputStreamName(streamName);

    if (checkSchemaExists(streamName)) {
      context.setOutputSchema(getSchemaByName(streamName));
    } else {
      context.setPipeStreamNotCreated(true);
    }

    analyzeSelectStatement();
    createOutputStream();
    return context;
  }