MCPcopy Create free account
hub / github.com/apache/arrow / garrow_call_expression_new

Function garrow_call_expression_new

c_glib/arrow-glib/expression.cpp:346–367  ·  view source on GitHub ↗

* garrow_call_expression_new: * @function: A name of function to be called. * @arguments: (element-type GArrowExpression): Arguments of this call. * @options: (nullable): A #GArrowFunctionOptions for the called function. * * Returns: A newly created #GArrowCallExpression. * * Since: 6.0.0 */

Source from the content-addressed store, hash-verified

344 * Since: 6.0.0
345 */
346GArrowCallExpression *
347garrow_call_expression_new(const gchar *function,
348 GList *arguments,
349 GArrowFunctionOptions *options)
350{
351 std::vector<arrow::compute::Expression> arrow_arguments;
352 for (GList *node = arguments; node; node = node->next) {
353 auto argument = GARROW_EXPRESSION(node->data);
354 auto arrow_argument = garrow_expression_get_raw(argument);
355 arrow_arguments.push_back(*arrow_argument);
356 }
357 std::shared_ptr<arrow::compute::FunctionOptions> arrow_options;
358 if (options) {
359 arrow_options.reset(garrow_function_options_get_raw(options)->Copy().release());
360 }
361 auto arrow_expression = arrow::compute::call(function, arrow_arguments, arrow_options);
362 auto expression = GARROW_CALL_EXPRESSION(garrow_expression_new_raw(arrow_expression));
363 auto priv = GARROW_CALL_EXPRESSION_GET_PRIVATE(expression);
364 priv->arguments =
365 g_list_copy_deep(arguments, reinterpret_cast<GCopyFunc>(g_object_ref), nullptr);
366 return expression;
367}
368
369/**
370 * garrow_call_expression_get_arguments:

Callers

nothing calls this directly

Calls 8

push_backMethod · 0.80
callFunction · 0.50
resetMethod · 0.45
releaseMethod · 0.45
CopyMethod · 0.45

Tested by

no test coverage detected