return compileStatement(query, scan, binds, null, extractedNodes);
}
// TODO: remove this and replace checks on extractedNodes with tests for the scan filter
private static StatementContext compileStatement(String query, Scan scan, List<Object> binds, Integer limit, Set<Expression> extractedNodes) throws SQLException {
SQLParser parser = new SQLParser(query);
SelectStatement statement = parser.parseQuery();
PhoenixConnection pconn = DriverManager.getConnection(getUrl(), TEST_PROPERTIES).unwrap(PhoenixConnection.class);
ColumnResolver resolver = FromCompiler.getResolver(statement, pconn);
statement = StatementNormalizer.normalize(statement, resolver);
StatementContext context = new StatementContext(new PhoenixStatement(pconn), resolver, binds, scan);