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

Method Seek

c_glib/arrow-glib/input-stream.cpp:862–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860 }
861
862 arrow::Status
863 Seek(int64_t position) override
864 {
865 if (!G_IS_SEEKABLE(input_stream_)) {
866 std::string message("[gio-input-stream][seek] "
867 "not seekable input stream: <");
868 message += G_OBJECT_CLASS_NAME(G_OBJECT_GET_CLASS(input_stream_));
869 message += ">";
870 return arrow::Status::NotImplemented(message);
871 }
872
873 std::lock_guard<std::mutex> guard(lock_);
874 GError *error = NULL;
875 if (g_seekable_seek(G_SEEKABLE(input_stream_),
876 position,
877 G_SEEK_SET,
878 NULL,
879 &error)) {
880 return arrow::Status::OK();
881 } else {
882 return garrow_error_to_status(error,
883 arrow::StatusCode::IOError,
884 "[gio-input-stream][seek]");
885 }
886 }
887
888 arrow::Result<int64_t>
889 GetSize() override

Callers

nothing calls this directly

Calls 3

garrow_error_to_statusFunction · 0.85
NotImplementedFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected