Skip to content

bigquery: read large unordered ARROW results with more than one stream #18804

Open

Description

@ohmayr

Before ARROW, to_arrow() and to_dataframe() read query results with as many streams as BigQuery allows unless _contains_order_by() matched the query (_download_table_bqstorage() requests 0 streams, which means unlimited). ARROW query results always read with one stream, so very large unordered results may be slower than on the old path. Raised by @tswast in #18654 (comment).

  • Explicit destination tables (feat(bigquery): read Arrow results from explicit destinations #18654): CreateReadSession uses max_stream_count=1. Do the same _contains_order_by() check and allow more streams when the query has no ORDER BY, reading them in parallel.
  • Job _default stream (jobs.query, or jobs.insert with an anonymous destination): read directly with no read session, so there's no stream count. Check whether SplitReadStream works on job default streams, or whether there's another way to parallelize.
  • Compare throughput against the non-ARROW path for large unordered results.

Still confirming whether very large results are in scope for the ARROW work. The Node.js client (createQueryArrowStream()) has the same design.

Activity

  1. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    api: bigqueryIssues related to the BigQuery API.
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions