@Test public void testSimpleSelect2() throws Exception { String sql = "FROM ( SELECT * FROM s1 ) INSERT INTO STREAM s1 SELECT * " + "INSERT INTO STREAM s2 SELECT id " + "INSERT INTO STREAM s3 SELECT id, name WHERE id > 10"; SemanticAnalyzer analyzer = SemanticAnalyzerFactory.createAnalyzer(parser.parse(sql), initSchemas()); analyzer.analyze(); org.junit.Assert.assertEquals(1, 1); }
@Override public AnalyzeContext analyze() throws SemanticAnalyzerException { fromAnalyzer(); parallelAnalyzer(); dataSourceQueryArgumentsAnalyzer(); for (MultiInsertContext select : multiInsertContext.getInserts()) { SemanticAnalyzer analyzer = SemanticAnalyzerFactory.createAnalyzer(select, getAllSchemas()); MultiInsertAnalyzer mAnalzyer = (MultiInsertAnalyzer)analyzer; mAnalzyer.setFromAnalyzeContext(context.getFrom()); context.getMultiSelectBodyAnalyzeContexts().add((MultiInsertAnalyzeContext)mAnalzyer.analyze()); } validateSelectStatement(); return context; }
MultiInsertStatementAnalyzer extends BaseAnalyzer { @Override public AnalyzeContext analyze() throws SemanticAnalyzerException { fromAnalyzer(); parallelAnalyzer(); dataSourceQueryArgumentsAnalyzer(); for (MultiInsertContext select : multiInsertContext.getInserts()) { SemanticAnalyzer analyzer = SemanticAnalyzerFactory.createAnalyzer(select, getAllSchemas()); MultiInsertAnalyzer mAnalzyer = (MultiInsertAnalyzer)analyzer; mAnalzyer.setFromAnalyzeContext(context.getFrom()); context.getMultiSelectBodyAnalyzeContexts().add((MultiInsertAnalyzeContext)mAnalzyer.analyze()); } validateSelectStatement(); return context; } }
MultiInsertStatementAnalyzer extends BaseAnalyzer { @Override public AnalyzeContext analyze() throws SemanticAnalyzerException { fromAnalyzer(); parallelAnalyzer(); dataSourceQueryArgumentsAnalyzer(); for (MultiInsertContext select : multiInsertContext.getInserts()) { SemanticAnalyzer analyzer = SemanticAnalyzerFactory.createAnalyzer(select, getAllSchemas()); MultiInsertAnalyzer mAnalzyer = (MultiInsertAnalyzer)analyzer; mAnalzyer.setFromAnalyzeContext(context.getFrom()); context.getMultiSelectBodyAnalyzeContexts().add((MultiInsertAnalyzeContext)mAnalzyer.analyze()); } validateSelectStatement(); return context; } MultiInsertStatementAnalyzer(ParseContext parseContext); }
MultiInsertStatementAnalyzer extends BaseAnalyzer { @Override public AnalyzeContext analyze() throws SemanticAnalyzerException { fromAnalyzer(); parallelAnalyzer(); dataSourceQueryArgumentsAnalyzer(); for (MultiInsertContext select : multiInsertContext.getInserts()) { SemanticAnalyzer analyzer = SemanticAnalyzerFactory.createAnalyzer(select, getAllSchemas()); MultiInsertAnalyzer mAnalzyer = (MultiInsertAnalyzer)analyzer; mAnalzyer.setFromAnalyzeContext(context.getFrom()); context.getMultiSelectBodyAnalyzeContexts().add((MultiInsertAnalyzeContext)mAnalzyer.analyze()); } validateSelectStatement(); return context; } MultiInsertStatementAnalyzer(ParseContext parseContext); @Override AnalyzeContext analyze(); }
MultiInsertStatementAnalyzer extends BaseAnalyzer { @Override public AnalyzeContext analyze() throws SemanticAnalyzerException { fromAnalyzer(); parallelAnalyzer(); dataSourceQueryArgumentsAnalyzer(); for (MultiInsertContext select : multiInsertContext.getInserts()) { SemanticAnalyzer analyzer = SemanticAnalyzerFactory.createAnalyzer(select, getAllSchemas()); MultiInsertAnalyzer mAnalzyer = (MultiInsertAnalyzer)analyzer; mAnalzyer.setFromAnalyzeContext(context.getFrom()); context.getMultiSelectBodyAnalyzeContexts().add((MultiInsertAnalyzeContext)mAnalzyer.analyze()); } validateSelectStatement(); return context; } MultiInsertStatementAnalyzer(ParseContext parseContext); @Override AnalyzeContext analyze();  }