Commit c11ea33
committed
GH-48076: [C++][Flight] fix GeneratorStream for Tables
After the changes in #47115, GeneratorStreams backed by anything else
than RecordBatches failed. This includes Tables and RecordBatchReaders.
This was caused by a too strict assumption that the
RecordBatchStream#GetSchemaPayload would always get called, which
is not the case when the GeneratorStream is backed by a Table
or a RecordBatchReader.
So to fix this, remove the assertion and instead initialize the writer
on first access.1 parent cd23a76 commit c11ea33
File tree
2 files changed
+78
-9
lines changed- cpp/src/arrow/flight
- python/pyarrow/tests
2 files changed
+78
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 288 | + | |
294 | 289 | | |
295 | 290 | | |
296 | 291 | | |
| |||
317 | 312 | | |
318 | 313 | | |
319 | 314 | | |
320 | | - | |
321 | | - | |
| 315 | + | |
322 | 316 | | |
323 | 317 | | |
324 | 318 | | |
| |||
370 | 364 | | |
371 | 365 | | |
372 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
249 | 283 | | |
250 | 284 | | |
251 | 285 | | |
| |||
1362 | 1396 | | |
1363 | 1397 | | |
1364 | 1398 | | |
1365 | | - | |
| 1399 | + | |
1366 | 1400 | | |
1367 | 1401 | | |
1368 | 1402 | | |
| |||
1378 | 1412 | | |
1379 | 1413 | | |
1380 | 1414 | | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
1381 | 1447 | | |
1382 | 1448 | | |
1383 | 1449 | | |
| |||
0 commit comments