* garrow_feather_file_reader_read_names: * @reader: A #GArrowFeatherFileReader. * @names: (array length=n_names): The names of column to be read. * @n_names: The number of names. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (transfer full): The table in the file that has only the * specified columns. * * Since: 0.12.0 */
| 871 | * Since: 0.12.0 |
| 872 | */ |
| 873 | GArrowTable * |
| 874 | garrow_feather_file_reader_read_names(GArrowFeatherFileReader *reader, |
| 875 | const gchar **names, |
| 876 | guint n_names, |
| 877 | GError **error) |
| 878 | { |
| 879 | auto arrow_reader = garrow_feather_file_reader_get_raw(reader); |
| 880 | std::vector<std::string> cpp_names; |
| 881 | for (guint i = 0; i < n_names; ++i) { |
| 882 | cpp_names.push_back(names[i]); |
| 883 | } |
| 884 | std::shared_ptr<arrow::Table> arrow_table; |
| 885 | auto status = arrow_reader->Read(cpp_names, &arrow_table); |
| 886 | if (garrow_error_check(error, status, "[feather-file-reader][read-names]")) { |
| 887 | return garrow_table_new_raw(&arrow_table); |
| 888 | } else { |
| 889 | return NULL; |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | struct GArrowCSVReadOptionsPrivate |
| 894 | { |
nothing calls this directly
no test coverage detected