| 360 | |
| 361 | template <class F> |
| 362 | void ProcessArrowArrayStream( |
| 363 | PyObject* capsule, |
| 364 | F&& callback |
| 365 | ) { |
| 366 | try { |
| 367 | auto* stream = (ArrowArrayStream*)PyCapsule_GetPointer(capsule, "arrow_array_stream"); |
| 368 | if (!stream) { |
| 369 | return; |
| 370 | } |
| 371 | |
| 372 | auto array = MakeIntrusive<TArrowArrayHolder>(stream); |
| 373 | auto schema = MakeIntrusive<TArrowSchemaHolder>(stream); |
| 374 | |
| 375 | callback(std::move(schema), std::move(array)); |
| 376 | |
| 377 | } catch (...) { |
| 378 | ProcessException(); |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | void AsyncAddArrowNumColumn( |
| 383 | ui32 flatFeatureIdx, |
no test coverage detected