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

Function garrow_feather_file_reader_read_names

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

* 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 */

Source from the content-addressed store, hash-verified

873 * Since: 0.12.0
874 */
875GArrowTable *
876garrow_feather_file_reader_read_names(GArrowFeatherFileReader *reader,
877 const gchar **names,
878 guint n_names,
879 GError **error)
880{
881 auto arrow_reader = garrow_feather_file_reader_get_raw(reader);
882 std::vector<std::string> cpp_names;
883 for (guint i = 0; i < n_names; ++i) {
884 cpp_names.push_back(names[i]);
885 }
886 std::shared_ptr<arrow::Table> arrow_table;
887 auto status = arrow_reader->Read(cpp_names, &arrow_table);
888 if (garrow_error_check(error, status, "[feather-file-reader][read-names]")) {
889 return garrow_table_new_raw(&arrow_table);
890 } else {
891 return NULL;
892 }
893}
894
895struct GArrowCSVReadOptionsPrivate
896{

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