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

Function garrow_take

c_glib/arrow-glib/compute.cpp:67–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66template <typename GArrowTypeNewRaw>
67auto
68garrow_take(arrow::Datum arrow_values,
69 arrow::Datum arrow_indices,
70 GArrowTakeOptions *options,
71 GArrowTypeNewRaw garrow_type_new_raw,
72 GError **error,
73 const gchar *tag) -> decltype(garrow_type_new_raw(arrow::Datum()))
74{
75 arrow::Result<arrow::Datum> arrow_taken_datum;
76 if (options) {
77 auto arrow_options = garrow_take_options_get_raw(options);
78 arrow_taken_datum = arrow::compute::Take(arrow_values, arrow_indices, *arrow_options);
79 } else {
80 arrow_taken_datum = arrow::compute::Take(arrow_values, arrow_indices);
81 }
82 if (garrow::check(error, arrow_taken_datum, tag)) {
83 return garrow_type_new_raw(*arrow_taken_datum);
84 } else {
85 return NULL;
86 }
87}
88
89namespace {
90 gboolean

Calls 4

TakeFunction · 0.85
checkFunction · 0.70
DatumFunction · 0.50

Tested by

no test coverage detected