@Test public void testExecuteWithIllegalQueryShouldBeCaughtByHandler() { pplService.execute(new PPLQueryRequest("search", null), new ResponseListener<QueryResponse>() { @Override public void onResponse(QueryResponse pplQueryResponse) { Assert.fail(); } @Override public void onFailure(Exception e) { } }); }
public void execute(PPLQueryRequest request, ResponseListener<QueryResponse> listener) { try { ParseTree cst = parser.analyzeSyntax(request.getRequest()); UnresolvedPlan ast = cst.accept(new AstBuilder(new AstExpressionBuilder(), request.getRequest())); LogicalPlan logicalPlan = analyzer.analyze(UnresolvedPlanHelper.addSelectAll(ast), new AnalysisContext()); PhysicalPlan physicalPlan = new Planner(storageEngine).plan(logicalPlan); executionEngine.execute(physicalPlan, listener); } catch (Exception e) { listener.onFailure(e); } }
PPLService { public void execute(PPLQueryRequest request, ResponseListener<QueryResponse> listener) { try { ParseTree cst = parser.analyzeSyntax(request.getRequest()); UnresolvedPlan ast = cst.accept(new AstBuilder(new AstExpressionBuilder(), request.getRequest())); LogicalPlan logicalPlan = analyzer.analyze(UnresolvedPlanHelper.addSelectAll(ast), new AnalysisContext()); PhysicalPlan physicalPlan = new Planner(storageEngine).plan(logicalPlan); executionEngine.execute(physicalPlan, listener); } catch (Exception e) { listener.onFailure(e); } } }
PPLService { public void execute(PPLQueryRequest request, ResponseListener<QueryResponse> listener) { try { ParseTree cst = parser.analyzeSyntax(request.getRequest()); UnresolvedPlan ast = cst.accept(new AstBuilder(new AstExpressionBuilder(), request.getRequest())); LogicalPlan logicalPlan = analyzer.analyze(UnresolvedPlanHelper.addSelectAll(ast), new AnalysisContext()); PhysicalPlan physicalPlan = new Planner(storageEngine).plan(logicalPlan); executionEngine.execute(physicalPlan, listener); } catch (Exception e) { listener.onFailure(e); } }  }
PPLService { public void execute(PPLQueryRequest request, ResponseListener<QueryResponse> listener) { try { ParseTree cst = parser.analyzeSyntax(request.getRequest()); UnresolvedPlan ast = cst.accept(new AstBuilder(new AstExpressionBuilder(), request.getRequest())); LogicalPlan logicalPlan = analyzer.analyze(UnresolvedPlanHelper.addSelectAll(ast), new AnalysisContext()); PhysicalPlan physicalPlan = new Planner(storageEngine).plan(logicalPlan); executionEngine.execute(physicalPlan, listener); } catch (Exception e) { listener.onFailure(e); } }  void execute(PPLQueryRequest request, ResponseListener<QueryResponse> listener); }
PPLService { public void execute(PPLQueryRequest request, ResponseListener<QueryResponse> listener) { try { ParseTree cst = parser.analyzeSyntax(request.getRequest()); UnresolvedPlan ast = cst.accept(new AstBuilder(new AstExpressionBuilder(), request.getRequest())); LogicalPlan logicalPlan = analyzer.analyze(UnresolvedPlanHelper.addSelectAll(ast), new AnalysisContext()); PhysicalPlan physicalPlan = new Planner(storageEngine).plan(logicalPlan); executionEngine.execute(physicalPlan, listener); } catch (Exception e) { listener.onFailure(e); } }  void execute(PPLQueryRequest request, ResponseListener<QueryResponse> listener);  }