in ratatool-sampling/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/PatchedBigQueryTableRowIterator.java [487:506]
public void close() {
// Prevent any further requests.
lastPage = true;
try {
// Deleting temporary table and dataset that gets generated when executing a query.
if (temporaryDatasetId != null) {
if (temporaryTableId != null) {
deleteTable(temporaryDatasetId, temporaryTableId);
}
deleteDataset(temporaryDatasetId);
}
} catch (IOException | InterruptedException e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
throw new RuntimeException(e);
}
}