* garrow_table_slice: * @table: A #GArrowTable. * @offset: The offset of sub #GArrowTable. If the offset is negative, * the offset is counted from the last. * @length: The length of sub #GArrowTable. * * Returns: (transfer full): The sub #GArrowTable. It covers * only from `offset` to `offset + length` range. The sub * #GArrowTable shares values with the base * #GArrowTable. * *
| 703 | * Since: 0.14.0 |
| 704 | */ |
| 705 | GArrowTable * |
| 706 | garrow_table_slice(GArrowTable *table, gint64 offset, gint64 length) |
| 707 | { |
| 708 | const auto arrow_table = garrow_table_get_raw(table); |
| 709 | if (offset < 0) { |
| 710 | offset += arrow_table->num_rows(); |
| 711 | } |
| 712 | auto arrow_sub_table = arrow_table->Slice(offset, length); |
| 713 | return garrow_table_new_raw(&arrow_sub_table); |
| 714 | } |
| 715 | |
| 716 | /** |
| 717 | * garrow_table_combine_chunks: |
nothing calls this directly
no test coverage detected