@Test public void testSimpleDistributedQuery() throws Exception { StringReader q1 = new StringReader("SELECT a FROM testlog WHEN EXISTS aa IN a : (aa >= "+((LEN-3)*(LEN-3))+");"); long startTime = System.currentTimeMillis(); Scanner scanner = new Scanner(q1); scanner.yylex(); rqlParser parser = new rqlParser(scanner); parser.parse(); List<Runner> runners = StatementProcessor.processStatements( parser.getQueries(), "testapp", ignite ); int totalCuts = 0; for (Runner s: runners) { for (GlobalCut cut : s.getEmittedCuts()) { System.out.println(cut); } totalCuts += s.getEmittedCuts().size(); long endEndTime = System.currentTimeMillis(); System.out.println("Query executed in: " + (endEndTime - startTime) + " ms for " + s.getEmittedCuts().size() + " cuts"); } assertTrue(totalCuts == 3); }
public ArrayList<GlobalCut> getEmittedCuts() { return emittedGlobalCuts; }
DistributedQueryRunner implements Runner { public ArrayList<GlobalCut> getEmittedCuts() { return emittedGlobalCuts; } }
DistributedQueryRunner implements Runner { public ArrayList<GlobalCut> getEmittedCuts() { return emittedGlobalCuts; } DistributedQueryRunner(Query q, String appName, String igniteConfigPath);  DistributedQueryRunner(Query q, String appName, Ignite ignite);  DistributedQueryRunner(Query q, String appName); }
DistributedQueryRunner implements Runner { public ArrayList<GlobalCut> getEmittedCuts() { return emittedGlobalCuts; } DistributedQueryRunner(Query q, String appName, String igniteConfigPath);  DistributedQueryRunner(Query q, String appName, Ignite ignite);  DistributedQueryRunner(Query q, String appName); ArrayList<RQLRunTimeException> getExceptions(); boolean hasRunTimeErrors(); boolean hasRunTimeWarnings(); ArrayList<RQLRunTimeWarning> getWarnings(); String getAppName(); void setAppName(String appName); void setAffinityCompute(boolean affinityCompute); @Override boolean isExplain(); String explain(); void execute(); ArrayList<GlobalCut> getEmittedCuts(); }
DistributedQueryRunner implements Runner { public ArrayList<GlobalCut> getEmittedCuts() { return emittedGlobalCuts; } DistributedQueryRunner(Query q, String appName, String igniteConfigPath);  DistributedQueryRunner(Query q, String appName, Ignite ignite);  DistributedQueryRunner(Query q, String appName); ArrayList<RQLRunTimeException> getExceptions(); boolean hasRunTimeErrors(); boolean hasRunTimeWarnings(); ArrayList<RQLRunTimeWarning> getWarnings(); String getAppName(); void setAppName(String appName); void setAffinityCompute(boolean affinityCompute); @Override boolean isExplain(); String explain(); void execute(); ArrayList<GlobalCut> getEmittedCuts();  }