* garrow_array_slice: * @array: A #GArrowArray. * @offset: The offset of sub #GArrowArray. * @length: The length of sub #GArrowArray. * * Returns: (transfer full): The sub #GArrowArray. It covers only from * `offset` to `offset + length` range. The sub #GArrowArray shares * values with the base #GArrowArray. */
| 1170 | * values with the base #GArrowArray. |
| 1171 | */ |
| 1172 | GArrowArray * |
| 1173 | garrow_array_slice(GArrowArray *array, gint64 offset, gint64 length) |
| 1174 | { |
| 1175 | const auto arrow_array = garrow_array_get_raw(array); |
| 1176 | auto arrow_sub_array = arrow_array->Slice(offset, length); |
| 1177 | return garrow_array_new_raw(&arrow_sub_array, |
| 1178 | "array", |
| 1179 | &arrow_sub_array, |
| 1180 | "parent", |
| 1181 | array, |
| 1182 | NULL); |
| 1183 | } |
| 1184 | |
| 1185 | /** |
| 1186 | * garrow_array_to_string: |
nothing calls this directly
no test coverage detected