Repository navigation
Commit 576a42e
authored
fix(bigquery): raise when an Arrow batch arrives before its schema (#9681)
## Context & Problem
`createQueryArrowStream` turned a record batch that arrived without a
schema into an empty `RecordBatch`, silently dropping its rows. The skip
has been on `main` since #9596, so this fixes it on its own, outside the
Arrow stack.
## Summary of Changes
- `decodeArrowPayload` throws `Got an Arrow record batch before its
schema.` when it gets batch bytes without a schema, matching the Python
client (googleapis/google-cloud-python#18791).
- Responses with neither a schema nor a batch (for example DDL/DML)
still yield one 0-column `RecordBatch`.
## Verification
- New unit test for an inline `jobs.query` response with
`arrowRecordBatch` but no `arrowSchema`; it fails without the fix.
- `pnpm test` in `handwritten/bigquery`: 551 passing.
- `GIT_DIFF_ARG=origin/main node ./bin/linter.mjs --strict`: no
problems.1 parent 2062403 commit 576a42e
2 files changed
Lines changed: 52 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
354 | 363 | | |
355 | 364 | | |
356 | 365 | | |
357 | 366 | | |
358 | 367 | | |
359 | | - | |
| 368 | + | |
360 | 369 | | |
361 | 370 | | |
362 | 371 | | |
363 | 372 | | |
364 | 373 | | |
365 | 374 | | |
366 | | - | |
| 375 | + | |
367 | 376 | | |
368 | 377 | | |
369 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
452 | 492 | | |
453 | 493 | | |
454 | 494 | | |
| |||
0 commit comments