public interface ArrowQueryResult extends AutoCloseable, Iterable<VectorSchemaRoot>[Beta] A query result container providing zero-copy access to Apache Arrow VectorSchemaRoot batches. This serves as the high-throughput, Arrow-native counterpart to the canonical TableResult.
Important Usage Warning: The VectorSchemaRoot returned by the iterator is a single, shared, mutated instance across iterations. Data in the root is only valid during the current iteration step and will be overwritten or cleared on the next call to java.util.Iterator#next(). Callers needing data across iteration steps must copy the data out of the vectors before advancing the iterator.
Implementations manage direct off-heap native memory buffers. Callers must invoke #close() (idiomatically via a try-with-resources block) to ensure native allocations and
underlying gRPC streaming channels are deterministically released.
Methods
close()
public abstract void close()Releases underlying direct off-heap memory allocations and closes any active stream channels.
getArrowSchema()
public abstract Schema getArrowSchema()Returns the Apache Arrow schema of the result vectors.
| Returns | |
|---|---|
| Type | Description |
org.apache.arrow.vector.types.pojo.Schema |
|
getJobCreationReason()
public abstract JobCreationReason getJobCreationReason()Returns the reason a job was created when optional job creation was requested, or null
if no job was created or if the query ran via the fallback path.
| Returns | |
|---|---|
| Type | Description |
JobCreationReason |
|
getJobId()
public abstract JobId getJobId()Returns the job ID associated with the query execution, or null if no job was created
(e.g. when optional job creation was used).
| Returns | |
|---|---|
| Type | Description |
JobId |
|
getQueryId()
public abstract String getQueryId()Returns the query ID associated with the query execution, or null if unavailable.
| Returns | |
|---|---|
| Type | Description |
String |
|
getTotalRows()
public abstract long getTotalRows()Returns the total number of rows across all batches if known, or -1 if unknown.
| Returns | |
|---|---|
| Type | Description |
long |
|