Title: bigquery: ARROW query_and_wait returns empty result on cached large-result queries · Issue #18935 · googleapis/google-cloud-python · GitHub
Open Graph Title: bigquery: ARROW query_and_wait returns empty result on cached large-result queries · Issue #18935 · googleapis/google-cloud-python
X Title: bigquery: ARROW query_and_wait returns empty result on cached large-result queries · Issue #18935 · googleapis/google-cloud-python
Description: I've been seeing falures on pyarrow tests, that seem related to the new feature (#18650) ________ test_query_and_wait_arrow_cached_results[too_large_for_inline] ________ [gw1] linux -- Python 3.12.12 /tmpfs/src/github/google-cloud-python...
Open Graph Description: I've been seeing falures on pyarrow tests, that seem related to the new feature (#18650) ________ test_query_and_wait_arrow_cached_results[too_large_for_inline] ________ [gw1] linux -- Python 3.12....
X Description: I've been seeing falures on pyarrow tests, that seem related to the new feature (#18650) ________ test_query_and_wait_arrow_cached_results[too_large_for_inline] ________ [gw1] linux -- Python 3...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/18935
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bigquery: ARROW query_and_wait returns empty result on cached large-result queries","articleBody":"I've been [seeing falures](https://btx.cloud.google.com/invocations/49e28a7d-0d56-4afb-95a1-bf2ed6d4aa6a/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fgoogle-cloud-python%2Fpresubmit%2Fsystem/log) on pyarrow tests, that seem related to the new feature (https://github.com/googleapis/google-cloud-python/pull/18650)\n\n```\n________ test_query_and_wait_arrow_cached_results[too_large_for_inline] ________\n[gw1] linux -- Python 3.12.12 /tmpfs/src/github/google-cloud-python/packages/google-cloud-bigquery/.nox/system-3-12/bin/python\n\nbigquery_client = \npriority = None, page_size = None, num_rows = 20000, payload_size = 1024\n\n @pytest.mark.parametrize(\n (\"priority\", \"page_size\", \"num_rows\", \"payload_size\"),\n [\n (None, 100, 1000, 0),\n # The results are too large to return inline, so the cached jobs.query\n # response has no rows and totalRows is 0.\n (None, None, 20000, 1024),\n (enums.QueryPriority.INTERACTIVE, 100, 1000, 0),\n ],\n ids=[\"some_rows_inline\", \"too_large_for_inline\", \"no_rows_inline\"],\n )\n def test_query_and_wait_arrow_cached_results(\n bigquery_client, priority, page_size, num_rows, payload_size\n ):\n # No other query uses this literal, so only the second run can hit the\n # cache.\n query = (\n f\"SELECT x, '{uuid.uuid4().hex}' AS key, REPEAT('x', {payload_size}) AS p \"\n f\"FROM UNNEST(GENERATE_ARRAY(1, {num_rows})) AS x ORDER BY x\"\n )\n job_config = bigquery.QueryJobConfig(use_query_cache=True)\n if priority is not None:\n job_config.priority = priority\n \n def read():\n rows = bigquery_client.query_and_wait(\n query,\n job_config=job_config,\n page_size=page_size,\n query_results_format=enums.QueryResultsFormat.ARROW,\n )\n table = pyarrow.Table.from_batches(list(rows.to_arrow_iterable()))\n return bigquery_client.get_job(rows.job_id, location=rows.location), table\n \n first_job, first = read()\n cached_job, cached = read()\n \n assert not first_job.cache_hit\n assert cached_job.cache_hit\n> assert cached.num_rows == num_rows\nE assert 0 == 20000\nE + where 0 = pyarrow.Table\\n\\n----.num_rows\n\n```\n","author":{"url":"https://github.com/daniel-sanche","@type":"Person","name":"daniel-sanche"},"datePublished":"2026-10-31T00:28:44Z","url":"https://github.com/googleapis/google-cloud-python/issues/18935"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:41800a75-172b-8653-c3bf-6d98a9750b44 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A3E8:1C0763:3FF940:536E73:6AFE6370 |
| html-safe-nonce | e068111bd87289b3ceccae03e0fe32c12bc30c863d396b1d6102b7b745c71fb3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0U4OjFDMDc2MzozRkY5NDA6NTM2RTczOjZBRkU2MzcwIiwidmlzaXRvcl9pZCI6Ijg0NTQ0MTEzMjAyOTExMjQwODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f7bc1777d1877ee83c81f8fdf79126abc3ee77540ef4ac9cd473a57b53f58dc |
| hovercard-subject-tag | issue:6129127931 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/18935/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50c15c626e81d37e41955050356453486b7c49514113ca82d634e9a409f66a80/googleapis/google-cloud-python/issues/18935 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50c15c626e81d37e41955050356453486b7c49514113ca82d634e9a409f66a80/googleapis/google-cloud-python/issues/18935 |
| og:image:alt | I've been seeing falures on pyarrow tests, that seem related to the new feature (#18650) ________ test_query_and_wait_arrow_cached_results[too_large_for_inline] ________ [gw1] linux -- Python 3.12.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | daniel-sanche |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width