private void analyzeInsertClause() throws SemanticAnalyzerException { String streamName = multiInsert.getOutputStream(); context.setOutputStreamName(streamName); if (checkSchemaExists(streamName)) { context.setOutputSchema(getSchemaByName(streamName)); } else { context.setPipeStreamNotCreated(true); } }
private void analyzeSelectStatement() throws SemanticAnalyzerException { SemanticAnalyzer selectAnalzyer = SemanticAnalyzerFactory.createAnalyzer(multiInsert.getSelects(), getAllSchemas()); SelectWithOutFromAnalyzer sAnalyzer = (SelectWithOutFromAnalyzer) selectAnalzyer; sAnalyzer.setFromAnalyzeContext(getFromAnalyzeContext()); context.setSelectContext((SelectWithOutFromAnalyzeContext) selectAnalzyer.analyze()); }
private void createOutputStream() { if (!context.isPipeStreamNotCreated()) { return; } Schema outputSchema = context.getSelectContext().getSelectClauseContext().getOutputSchema(); outputSchema.setId(context.getOutputStreamName()); outputSchema.setName(context.getOutputStreamName()); outputSchema.setStreamName(context.getOutputStreamName()); context.setOutputSchema(outputSchema); }