Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions java-bigquery/google-cloud-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@
<artifactId>arrow-memory-netty</artifactId>
</dependency>

<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-api</artifactId>
</dependency>

<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,58 @@ TableResult query(QueryJobConfiguration configuration, JobOption... options)
TableResult query(QueryJobConfiguration configuration, JobId jobId, JobOption... options)
throws InterruptedException, JobException;

/**
* <b>[Beta]</b> Runs the query associated with the request and returns an {@link
* ArrowQueryResult} yielding Apache Arrow {@code VectorSchemaRoot} batches directly for zero-copy
* vector access.
*
* <p>Callers must manage off-heap native memory by closing the returned {@link ArrowQueryResult}
* (e.g. via a {@code try-with-resources} block).
*
* <p><b>Prerequisite:</b> Requires the BigQuery Storage Read API ({@code
* bigquerystorage.googleapis.com}) to be enabled on your GCP project.
*
* @param configuration the query configuration
* @param options query options
* @return an {@link ArrowQueryResult} streaming Arrow vectors
* @throws BigQueryException upon failure
* @throws InterruptedException if the current thread gets interrupted while waiting for the query
* to complete
* @throws JobException if the job completes unsuccessfully
*/
@BetaApi
default ArrowQueryResult queryArrow(QueryJobConfiguration configuration, JobOption... options)
throws InterruptedException, JobException {
throw new UnsupportedOperationException("queryArrow is not implemented");
}

/**
* <b>[Beta]</b> Runs the query associated with the request, using the given JobId, and returns an
* {@link ArrowQueryResult} yielding Apache Arrow {@code VectorSchemaRoot} batches directly for
* zero-copy vector access.
*
* <p>Callers must manage off-heap native memory by closing the returned {@link ArrowQueryResult}
* (e.g. via a {@code try-with-resources} block).
*
* <p><b>Prerequisite:</b> Requires the BigQuery Storage Read API ({@code
* bigquerystorage.googleapis.com}) to be enabled on your GCP project.
*
* @param configuration the query configuration
* @param jobId the job ID to use
* @param options query options
* @return an {@link ArrowQueryResult} streaming Arrow vectors
* @throws BigQueryException upon failure
* @throws InterruptedException if the current thread gets interrupted while waiting for the query
* to complete
* @throws JobException if the job completes unsuccessfully
*/
@BetaApi
default ArrowQueryResult queryArrow(
QueryJobConfiguration configuration, JobId jobId, JobOption... options)
throws InterruptedException, JobException {
throw new UnsupportedOperationException("queryArrow is not implemented");
}

/**
* Starts the query associated with the request, using the given JobId. It returns either
* TableResult for quick queries or Job object for long-running queries.
Expand Down
Loading
Loading