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

Function garrow_readable_read

c_glib/arrow-glib/readable.cpp:54–66  ·  view source on GitHub ↗

* garrow_readable_read: * @readable: A #GArrowReadable. * @n_bytes: The number of bytes to be read. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (transfer full) (nullable): #GArrowBuffer that has read * data on success, %NULL if there was an error. */

Source from the content-addressed store, hash-verified

52 * data on success, %NULL if there was an error.
53 */
54GArrowBuffer *
55garrow_readable_read(GArrowReadable *readable, gint64 n_bytes, GError **error)
56{
57 const auto arrow_readable = garrow_readable_get_raw(readable);
58
59 auto arrow_buffer = arrow_readable->Read(n_bytes);
60 if (garrow::check(error, arrow_buffer, "[readable][read]")) {
61 auto *iface = GARROW_READABLE_GET_IFACE(readable);
62 return iface->buffer_new_raw(&(arrow_buffer.ValueOrDie()));
63 } else {
64 return NULL;
65 }
66}
67
68/**
69 * garrow_readable_read_bytes:

Callers

nothing calls this directly

Calls 3

ValueOrDieMethod · 0.80
checkFunction · 0.70
ReadMethod · 0.45

Tested by

no test coverage detected