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

Method Write

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

Source from the content-addressed store, hash-verified

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

Calls 3

garrow_error_to_statusFunction · 0.85
strMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected