try {
PhoenixPreparedStatement statement = conn.prepareStatement(query).unwrap(PhoenixPreparedStatement.class);
for (Object bind : binds) {
statement.setObject(1, bind);
}
QueryPlan plan = statement.compileQuery(query);
return plan.getContext().getScan();
} finally {
conn.close();
}
}