return compileStatement(query, Collections.emptyList(), null);
}
private static StatementContext compileStatement(String query, List<Object> binds, Integer limit) throws SQLException {
PhoenixConnection pconn = DriverManager.getConnection(getUrl(), TEST_PROPERTIES).unwrap(PhoenixConnection.class);
PhoenixPreparedStatement pstmt = new PhoenixPreparedStatement(pconn, query);
TestUtil.bindParams(pstmt, binds);
QueryPlan plan = pstmt.compileQuery();
assertEquals(limit, plan.getLimit());
return plan.getContext();
}