You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final Map<String, Object> parameters = new HashMap<>();
parameters.put(AdbcDriver.PARAM_URL, "jdbc:postgresql://localhost:5432/postgres");
try (
BufferAllocator allocator = new RootAllocator();
AdbcDatabase db = new JdbcDriver(allocator).open(parameters);
AdbcConnection adbcConnection = db.connect();
AdbcStatement stmt = adbcConnection.createStatement()
) {
stmt.setSqlQuery("select * from foo");
AdbcStatement.QueryResult queryResult = stmt.executeQuery();
while (queryResult.getReader().loadNextBatch()) {
// process batch
}
} catch (AdbcException e) {
// throw
}
stmt.executeQuery() will cause oom
in jdbc, statement has a method statement.setFetchSize(batchSize); to fetch a part of data
can give a option to define this and queryResult.getReader().loadNextBatch() load this size data
The text was updated successfully, but these errors were encountered:
What feature or improvement would you like to see?
according to https://arrow.apache.org/adbc/current/java/quickstart.html
stmt.executeQuery() will cause oom
in jdbc, statement has a method
statement.setFetchSize(batchSize);
to fetch a part of datacan give a option to define this and
queryResult.getReader().loadNextBatch()
load this size dataThe text was updated successfully, but these errors were encountered: