* ggandiva_selectable_projector_evaluate: * @projector: A #GGandivaSelectableProjector. * @record_batch: A #GArrowRecordBatch. * @selection_vector: A #GGandivaSelectionVector that specifies * the filtered row positions. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (element-type GArrowArray) (nullable) (transfer full): * The #GArrowArray as the result evalu
| 306 | * Since: 4.0.0 |
| 307 | */ |
| 308 | GList * |
| 309 | ggandiva_selectable_projector_evaluate(GGandivaSelectableProjector *projector, |
| 310 | GArrowRecordBatch *record_batch, |
| 311 | GGandivaSelectionVector *selection_vector, |
| 312 | GError **error) |
| 313 | { |
| 314 | auto gandiva_projector = ggandiva_projector_get_raw(GGANDIVA_PROJECTOR(projector)); |
| 315 | auto arrow_record_batch = garrow_record_batch_get_raw(record_batch); |
| 316 | auto gandiva_selection_vector = |
| 317 | ggandiva_selection_vector_get_raw(selection_vector).get(); |
| 318 | auto memory_pool = arrow::default_memory_pool(); |
| 319 | arrow::ArrayVector arrow_arrays; |
| 320 | auto status = gandiva_projector->Evaluate(*arrow_record_batch, |
| 321 | gandiva_selection_vector, |
| 322 | memory_pool, |
| 323 | &arrow_arrays); |
| 324 | if (garrow_error_check(error, status, "[gandiva][selectable-projector][evaluate]")) { |
| 325 | GList *arrays = NULL; |
| 326 | for (auto arrow_array : arrow_arrays) { |
| 327 | auto array = garrow_array_new_raw(&arrow_array); |
| 328 | arrays = g_list_prepend(arrays, array); |
| 329 | } |
| 330 | return g_list_reverse(arrays); |
| 331 | } else { |
| 332 | return NULL; |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | G_END_DECLS |
| 337 |
nothing calls this directly
no test coverage detected