use of org.apache.phoenix.jdbc.DelegatePreparedStatement in project trino by trinodb.
the class PhoenixClient method buildSql.
@Override
public PreparedStatement buildSql(ConnectorSession session, Connection connection, JdbcSplit split, JdbcTableHandle table, List<JdbcColumnHandle> columnHandles) throws SQLException {
PreparedStatement query = prepareStatement(session, connection, table, columnHandles, Optional.of(split));
QueryPlan queryPlan = getQueryPlan((PhoenixPreparedStatement) query);
ResultSet resultSet = getResultSet(((PhoenixSplit) split).getPhoenixInputSplit(), queryPlan);
return new DelegatePreparedStatement(query) {
@Override
public ResultSet executeQuery() {
return resultSet;
}
};
}
use of org.apache.phoenix.jdbc.DelegatePreparedStatement in project trino by trinodb.
the class PhoenixClient method buildSql.
@Override
public PreparedStatement buildSql(ConnectorSession session, Connection connection, JdbcSplit split, JdbcTableHandle table, List<JdbcColumnHandle> columnHandles) throws SQLException {
PreparedStatement query = prepareStatement(session, connection, table, columnHandles, Optional.of(split));
QueryPlan queryPlan = getQueryPlan((PhoenixPreparedStatement) query);
ResultSet resultSet = getResultSet(((PhoenixSplit) split).getPhoenixInputSplit(), queryPlan);
return new DelegatePreparedStatement(query) {
@Override
public ResultSet executeQuery() {
return resultSet;
}
};
}
Aggregations