* garrow_execute_plan_new: * @context: (nullable): A #GArrowExecuteContext or %NULL. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): A newly created #GArrowExecutePlan on success, * %NULL on error. * * Since: 6.0.0 */
| 2233 | * Since: 6.0.0 |
| 2234 | */ |
| 2235 | GArrowExecutePlan * |
| 2236 | garrow_execute_plan_new(GArrowExecuteContext *context, GError **error) |
| 2237 | { |
| 2238 | arrow::Result<std::shared_ptr<arrow::acero::ExecPlan>> arrow_plan_result; |
| 2239 | if (context) { |
| 2240 | auto arrow_context = garrow_execute_context_get_raw(context); |
| 2241 | arrow_plan_result = arrow::acero::ExecPlan::Make(*arrow_context); |
| 2242 | } else { |
| 2243 | arrow_plan_result = arrow::acero::ExecPlan::Make(); |
| 2244 | } |
| 2245 | if (garrow::check(error, arrow_plan_result, "[execute-plan][new]")) { |
| 2246 | return GARROW_EXECUTE_PLAN( |
| 2247 | g_object_new(GARROW_TYPE_EXECUTE_PLAN, "plan", &(*arrow_plan_result), NULL)); |
| 2248 | } else { |
| 2249 | return NULL; |
| 2250 | } |
| 2251 | } |
| 2252 | |
| 2253 | /** |
| 2254 | * garrow_execute_plan_build_node: |
nothing calls this directly
no test coverage detected