Skip to content

Commit

Permalink
Improved region check for bq interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
meharanjan318 committed Sep 9, 2024
1 parent 4d36db8 commit b268de2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.google.api.services.bigquery.model.TableRow;
import com.google.common.base.Function;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -278,7 +279,7 @@ public static Iterator<GetQueryResultsResponse> run(final String queryString,
GetQueryResults getRequest = service.jobs().getQueryResults(
projectId,
jobId);
if (region != null) {
if (StringUtils.isNotBlank(region)) {
getRequest = getRequest.setLocation(region);
}
return getPages(getRequest);
Expand Down

0 comments on commit b268de2

Please sign in to comment.