* ggandiva_function_node_new: * @name: The name of the function to be called. * @parameters: (element-type GGandivaNode): The parameters of the function call. * @return_type: The return type of the function call. * * Returns: A newly created #GGandivaFunctionNode for the function call. * * Since: 0.12.0 */
| 460 | * Since: 0.12.0 |
| 461 | */ |
| 462 | GGandivaFunctionNode * |
| 463 | ggandiva_function_node_new(const gchar *name, |
| 464 | GList *parameters, |
| 465 | GArrowDataType *return_type) |
| 466 | { |
| 467 | std::vector<std::shared_ptr<gandiva::Node>> gandiva_nodes; |
| 468 | for (auto node = parameters; node; node = g_list_next(node)) { |
| 469 | auto gandiva_node = ggandiva_node_get_raw(GGANDIVA_NODE(node->data)); |
| 470 | gandiva_nodes.push_back(gandiva_node); |
| 471 | } |
| 472 | auto arrow_return_type = garrow_data_type_get_raw(return_type); |
| 473 | auto gandiva_node = |
| 474 | gandiva::TreeExprBuilder::MakeFunction(name, gandiva_nodes, arrow_return_type); |
| 475 | return ggandiva_function_node_new_raw(&gandiva_node, name, parameters, return_type); |
| 476 | } |
| 477 | |
| 478 | /** |
| 479 | * ggandiva_function_node_get_parameters: |
nothing calls this directly
no test coverage detected