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

Function garrow_table_concatenate

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

* garrow_table_concatenate: * @table: A #GArrowTable. * @other_tables: (element-type GArrowTable): The tables to be concatenated. * @options: (nullable): The options to customize concatenation. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The table concatenated vertically. * * Since: 0.14.0 */

Source from the content-addressed store, hash-verified

662 * Since: 0.14.0
663 */
664GArrowTable *
665garrow_table_concatenate(GArrowTable *table,
666 GList *other_tables,
667 GArrowTableConcatenateOptions *options,
668 GError **error)
669{
670 auto arrow_table = garrow_table_get_raw(table);
671 std::vector<std::shared_ptr<arrow::Table>> arrow_tables = {arrow_table};
672 for (auto node = other_tables; node; node = g_list_next(node)) {
673 auto arrow_other_table = garrow_table_get_raw(GARROW_TABLE(node->data));
674 arrow_tables.push_back(arrow_other_table);
675 }
676 auto arrow_options = arrow::ConcatenateTablesOptions::Defaults();
677 if (options) {
678 auto options_priv = GARROW_TABLE_CONCATENATE_OPTIONS_GET_PRIVATE(options);
679 arrow_options = options_priv->options;
680 }
681 auto arrow_concatenated_table_result =
682 arrow::ConcatenateTables(arrow_tables, arrow_options);
683 if (garrow::check(error, arrow_concatenated_table_result, "[table][concatenate]")) {
684 auto arrow_concatenated_table = std::move(*arrow_concatenated_table_result);
685 return garrow_table_new_raw(&arrow_concatenated_table);
686 } else {
687 return NULL;
688 }
689}
690
691/**
692 * garrow_table_slice:

Callers

nothing calls this directly

Calls 6

garrow_table_get_rawFunction · 0.85
ConcatenateTablesFunction · 0.85
garrow_table_new_rawFunction · 0.85
push_backMethod · 0.80
checkFunction · 0.70
DefaultsFunction · 0.50

Tested by

no test coverage detected