Skip to content

Commit

Permalink
This actually ensures close() is called
Browse files Browse the repository at this point in the history
  • Loading branch information
ywc88 committed Sep 18, 2023
1 parent 5cd8579 commit e28ed60
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ public AdbcStatement bulkIngest(String targetTableName, BulkIngestMode mode)
@Override
public ArrowReader getInfo(int[] infoCodes) throws AdbcException {
try (InfoMetadataBuilder builder = new InfoMetadataBuilder(allocator, client, infoCodes)) {
final VectorSchemaRoot root = builder.build();
return RootArrowReader.fromRoot(allocator, root);
try (final VectorSchemaRoot root = builder.build()) {
return RootArrowReader.fromRoot(allocator, root);
}
} catch (Exception e) {
throw AdbcException.invalidState("[Flight SQL] Failed to get info");
}
Expand Down

0 comments on commit e28ed60

Please sign in to comment.