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

Method Write

c_glib/arrow-glib/output-stream.cpp:393–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391 }
392
393 arrow::Status
394 Write(const void *data, int64_t n_bytes) override
395 {
396 GError *error = NULL;
397 gsize n_written_bytes;
398 auto succeeded = g_output_stream_write_all(output_stream_,
399 data,
400 n_bytes,
401 &n_written_bytes,
402 NULL,
403 &error);
404 if (succeeded) {
405 position_ += n_written_bytes;
406 return arrow::Status::OK();
407 } else {
408 std::stringstream message("[gio-output-stream][write]");
409 message << "[" << n_written_bytes << "/" << n_bytes << "]";
410 return garrow_error_to_status(error,
411 arrow::StatusCode::IOError,
412 message.str().c_str());
413 }
414 }
415
416 arrow::Status
417 Flush() override

Calls 3

garrow_error_to_statusFunction · 0.85
strMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected