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

Function garrow_table_slice

c_glib/arrow-glib/table.cpp:705–714  ·  view source on GitHub ↗

* 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. * *

Source from the content-addressed store, hash-verified

703 * Since: 0.14.0
704 */
705GArrowTable *
706garrow_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:

Callers

nothing calls this directly

Calls 3

garrow_table_get_rawFunction · 0.85
num_rowsMethod · 0.45
SliceMethod · 0.45

Tested by

no test coverage detected