-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Below snippet is returning null when there is no Routines in the dataset:
// clean up stale test routines in the test dataset
Page<Routine> routines =
bigquery.listRoutines(BIGQUERY_DATASET_NAME, BigQuery.RoutineListOption.pageSize(1000));
for (Routine routine : routines.getValues()) {
String routineName = routine.getRoutineId().getRoutine();
if (routineName.contains("MY_ROUTINE_NAME_TEST_") && routine.getCreationTime() > sixHourAgo) {
System.out.format("\tDeleting Routine: %s\n", routineName);
bigquery.delete(RoutineId.of(PROJECT_ID, BIGQUERY_DATASET_NAME, routineName));
}
}
When there are Routines in the dataset, nullpointer is not thrown on listRoutines method.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.