Repository navigation
Commit a1bbc07
table_buffering: surface client_log on TableBufferingParams
process() and combine() are unary RPCs and lack the OutputCollector that
the streaming finalize() callback uses for in-band logging. Add a
client_log: Callable on TableBufferingParams, wire it to ctx.client_log
in _load_table_buffering_params, and migrate SumAllColumnsFunction off
the stdlib logging.getLogger() call that never reached the wire.
The wire mechanism was always there — ReadUnaryResponse on the C++ side
dispatches 0-row vgi_rpc.log_level batches through HandleBatchLogMessage
before AND after the data batch, surfacing them in duckdb_logs() with
type='VGI'. What was missing was an entry point from the buffered
user-callback layer; ``out.client_log`` exists for streaming flows but
the unary flows had no analogue. ``params.client_log(level, message)``
fills that gap with the same call shape the streaming side uses.
Side effect: ``logging.test`` (which asserted "Processing batch with N
rows" reached duckdb_logs from sum_all_columns) now passes — the stdlib
logging.info() call it relied on was never bridged to the RPC stream;
the test was broken since the migration of sum_all_columns from
TableInOutGenerator (streaming, had ``out``) to TableBufferingFunction
(buffered, didn't).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d55e8ff commit a1bbc07
3 files changed
Lines changed: 35 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
499 | 500 | | |
500 | 501 | | |
501 | 502 | | |
502 | | - | |
503 | | - | |
504 | | - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
505 | 513 | | |
506 | 514 | | |
507 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
159 | 176 | | |
160 | 177 | | |
161 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
2580 | 2586 | | |
2581 | 2587 | | |
2582 | 2588 | | |
| |||
0 commit comments