@Test public void testRewriter() throws LensException { String query = "user query"; assertEquals(rewriter.rewriteToCubeQuery(query, null, null), Rewriter2.PREFIX + Rewriter1.PREFIX + query + Rewriter1.SUFFIX + Rewriter2.SUFFIX); }
public String rewriteToCubeQuery(String userQuery, Configuration conf, HiveConf hiveConf) throws LensException { for (Phase1Rewriter rewriter : phase1RewriterList) { userQuery = rewriter.rewrite(userQuery, conf, hiveConf); } return userQuery; }
UserQueryToCubeQueryRewriter { public String rewriteToCubeQuery(String userQuery, Configuration conf, HiveConf hiveConf) throws LensException { for (Phase1Rewriter rewriter : phase1RewriterList) { userQuery = rewriter.rewrite(userQuery, conf, hiveConf); } return userQuery; } }
UserQueryToCubeQueryRewriter { public String rewriteToCubeQuery(String userQuery, Configuration conf, HiveConf hiveConf) throws LensException { for (Phase1Rewriter rewriter : phase1RewriterList) { userQuery = rewriter.rewrite(userQuery, conf, hiveConf); } return userQuery; } UserQueryToCubeQueryRewriter(Configuration conf); }
UserQueryToCubeQueryRewriter { public String rewriteToCubeQuery(String userQuery, Configuration conf, HiveConf hiveConf) throws LensException { for (Phase1Rewriter rewriter : phase1RewriterList) { userQuery = rewriter.rewrite(userQuery, conf, hiveConf); } return userQuery; } UserQueryToCubeQueryRewriter(Configuration conf); String rewriteToCubeQuery(String userQuery, Configuration conf, HiveConf hiveConf); void rewrite(AbstractQueryContext ctx); }
UserQueryToCubeQueryRewriter { public String rewriteToCubeQuery(String userQuery, Configuration conf, HiveConf hiveConf) throws LensException { for (Phase1Rewriter rewriter : phase1RewriterList) { userQuery = rewriter.rewrite(userQuery, conf, hiveConf); } return userQuery; } UserQueryToCubeQueryRewriter(Configuration conf); String rewriteToCubeQuery(String userQuery, Configuration conf, HiveConf hiveConf); void rewrite(AbstractQueryContext ctx);  }