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

Aberta
#18,804 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
google-cloud, python
Domínio
data

Direção de pesquisa

Start with the ARROW query result paths, _download_table_bqstorage() and _contains_order_by(), then inspect the changes in PR #18654 and its discussion. Check whether SplitReadStream supports job _default streams and compare throughput with the non-ARROW path for large unordered results; done means determining a workable parallel read approach and measuring its effect, though the issue says the scope is still being confirmed.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

api: bigquery type: feature request

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 https://github.com/googleapis/google-cloud-python/pull/18654#discussion_r4340945206.

  • Explicit destination tables (#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.

Linguagem predominante
Python
Estrelas
5.4k
Forks
1.8k
Merge médio
2d 20h
PRs com merge (30d)
140

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de googleapis/google-cloud-python

Todas as issues de googleapis/google-cloud-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.