diff --git a/databricks-sdk-java/src/test/java/com/databricks/sdk/integration/SqlIT.java b/databricks-sdk-java/src/test/java/com/databricks/sdk/integration/SqlIT.java index 47f310cf..8d99f452 100644 --- a/databricks-sdk-java/src/test/java/com/databricks/sdk/integration/SqlIT.java +++ b/databricks-sdk-java/src/test/java/com/databricks/sdk/integration/SqlIT.java @@ -22,8 +22,10 @@ void listQueryHistoryTimeRange(WorkspaceClient w) { new ListQueryHistoryRequest() .setFilterBy(new QueryFilter().setQueryStartTimeRange(timeRange)); Iterable queries = w.queryHistory().list(request).getRes(); - for (QueryInfo query : queries) { - System.out.println(query); + if (queries != null) { + for (QueryInfo query : queries) { + System.out.println(query); + } } } @@ -33,8 +35,10 @@ void listQueryHistoryUserIds(WorkspaceClient w) { new ListQueryHistoryRequest() .setFilterBy(new QueryFilter().setUserIds(Arrays.asList(123L, 456L))); Iterable queries = w.queryHistory().list(request).getRes(); - for (QueryInfo query : queries) { - System.out.println(query); + if (queries != null) { + for (QueryInfo query : queries) { + System.out.println(query); + } } } }