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

Function garrow_feather_file_reader_read_indices

c_glib/arrow-glib/reader.cpp:843–861  ·  view source on GitHub ↗

* garrow_feather_file_reader_read_indices: * @reader: A #GArrowFeatherFileReader. * @indices: (array length=n_indices): The indices of column to be read. * @n_indices: The number of indices. * @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 */

Source from the content-addressed store, hash-verified

841 * Since: 0.12.0
842 */
843GArrowTable *
844garrow_feather_file_reader_read_indices(GArrowFeatherFileReader *reader,
845 const gint *indices,
846 guint n_indices,
847 GError **error)
848{
849 auto arrow_reader = garrow_feather_file_reader_get_raw(reader);
850 std::vector<int> cpp_indices(n_indices);
851 for (guint i = 0; i < n_indices; ++i) {
852 cpp_indices.push_back(indices[i]);
853 }
854 std::shared_ptr<arrow::Table> arrow_table;
855 auto status = arrow_reader->Read(cpp_indices, &arrow_table);
856 if (garrow_error_check(error, status, "[feather-file-reader][read-indices]")) {
857 return garrow_table_new_raw(&arrow_table);
858 } else {
859 return NULL;
860 }
861}
862
863/**
864 * garrow_feather_file_reader_read_names:

Callers

nothing calls this directly

Calls 5

garrow_error_checkFunction · 0.85
garrow_table_new_rawFunction · 0.85
push_backMethod · 0.80
ReadMethod · 0.45

Tested by

no test coverage detected