mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 09:05:47 +08:00
Follow changes in c_glib, fix Doxygen warning
This commit is contained in:
1 parent
7c1ae55c35
commit
3b27ac2624
3 files changed
+16
-5
No files matched your search
@@ -24,6 +24,7 @@
|
||||
#include <arrow/io/interfaces.h>
|
||||
#include <arrow/io/memory.h>
|
||||
#include <arrow/ipc/reader.h>
|
||||
#include <arrow/util/string_view.h>
|
||||
|
||||
#include <arrow-glib/buffer.hpp>
|
||||
#include <arrow-glib/codec.hpp>
|
||||
@@ -397,12 +398,20 @@ garrow_seekable_input_stream_read_at(GArrowSeekableInputStream *input_stream,
|
||||
*/
|
||||
GBytes *
|
||||
garrow_seekable_input_stream_peek(GArrowSeekableInputStream *input_stream,
|
||||
gint64 n_bytes)
|
||||
gint64 n_bytes,
|
||||
GError **error)
|
||||
{
|
||||
auto arrow_random_access_file =
|
||||
garrow_seekable_input_stream_get_raw(input_stream);
|
||||
auto string_view = arrow_random_access_file->Peek(n_bytes);
|
||||
return g_bytes_new_static(string_view.data(), string_view.size());
|
||||
|
||||
arrow::util::string_view view;
|
||||
auto status = arrow_random_access_file->Peek(n_bytes, &view);
|
||||
|
||||
if (garrow_error_check(error, status, "[seekable-input-stream][peek]")) {
|
||||
return g_bytes_new_static(view.data(), view.size());
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +68,8 @@ GArrowBuffer *garrow_seekable_input_stream_read_at(GArrowSeekableInputStream *in
|
||||
GError **error);
|
||||
GARROW_AVAILABLE_IN_0_12
|
||||
GBytes *garrow_seekable_input_stream_peek(GArrowSeekableInputStream *input_stream,
|
||||
gint64 n_bytes);
|
||||
gint64 n_bytes,
|
||||
GError **error);
|
||||
|
||||
|
||||
#define GARROW_TYPE_BUFFER_INPUT_STREAM \
|
||||
|
||||
@@ -128,7 +128,8 @@ class ARROW_EXPORT InputStream : virtual public FileInterface, virtual public Re
|
||||
/// returns 0-length string_view. May trigger buffering if the
|
||||
/// requested size is larger than the number of buffered bytes
|
||||
/// \param[in] nbytes the maximum number of bytes to see
|
||||
/// \return arrow::util::string_view
|
||||
/// \param[out] out the returned arrow::util::string_view
|
||||
/// \return Status
|
||||
virtual Status Peek(int64_t nbytes, util::string_view* out);
|
||||
|
||||
/// \brief Return true if InputStream is capable of zero copy Buffer reads
|
||||
|
||||
Reference in new issue
Block a user