* garrow_table_add_column: * @table: A #GArrowTable. * @i: The index of the new column. * @field: The field for the column to be added. * @chunked_array: The column data to be added. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The newly allocated * #GArrowTable that has a new column or %NULL on error. * * Since: 0.15.0 */
| 558 | * Since: 0.15.0 |
| 559 | */ |
| 560 | GArrowTable * |
| 561 | garrow_table_add_column(GArrowTable *table, |
| 562 | guint i, |
| 563 | GArrowField *field, |
| 564 | GArrowChunkedArray *chunked_array, |
| 565 | GError **error) |
| 566 | { |
| 567 | const auto arrow_table = garrow_table_get_raw(table); |
| 568 | const auto arrow_field = garrow_field_get_raw(field); |
| 569 | const auto arrow_chunked_array = garrow_chunked_array_get_raw(chunked_array); |
| 570 | auto maybe_new_table = arrow_table->AddColumn(i, arrow_field, arrow_chunked_array); |
| 571 | if (garrow::check(error, maybe_new_table, "[table][add-column]")) { |
| 572 | return garrow_table_new_raw(&(*maybe_new_table)); |
| 573 | } else { |
| 574 | return NULL; |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | /** |
| 579 | * garrow_table_remove_column: |
nothing calls this directly
no test coverage detected