* garrow_input_stream_read_tensor: * @input_stream: A #GArrowInputStream. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (transfer full) (nullable): * #GArrowTensor on success, %NULL on error. * * Since: 0.11.0 */
| 281 | * Since: 0.11.0 |
| 282 | */ |
| 283 | GArrowTensor * |
| 284 | garrow_input_stream_read_tensor(GArrowInputStream *input_stream, GError **error) |
| 285 | { |
| 286 | auto arrow_input_stream = garrow_input_stream_get_raw(input_stream); |
| 287 | |
| 288 | ARROW_SUPPRESS_DEPRECATION_WARNING |
| 289 | auto arrow_tensor = arrow::ipc::ReadTensor(arrow_input_stream.get()); |
| 290 | ARROW_UNSUPPRESS_DEPRECATION_WARNING |
| 291 | if (garrow::check(error, arrow_tensor, "[input-stream][read-tensor]")) { |
| 292 | return garrow_tensor_new_raw(&(arrow_tensor.ValueOrDie())); |
| 293 | } else { |
| 294 | return NULL; |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * garrow_input_stream_read_record_batch: |
nothing calls this directly
no test coverage detected