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:841–859  ·  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

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

Callers

nothing calls this directly

Calls 4

garrow_error_checkFunction · 0.85
push_backMethod · 0.80
ReadMethod · 0.45

Tested by

no test coverage detected