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

Method Write

cpp/src/arrow/dataset/file_json_test.cc:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 using FormatType = JsonFileFormat;
130
131 static Result<std::shared_ptr<Buffer>> Write(RecordBatchReader* reader) {
132 ARROW_ASSIGN_OR_RAISE(auto scalars, ToScalars(reader));
133 std::stringstream ss;
134 rj::OStreamWrapper sink(ss);
135 for (const auto& scalar : scalars) {
136 RETURN_NOT_OK(WriteJson(*scalar, &sink));
137 ss << "\n";
138 }
139 return Buffer::FromString(ss.str());
140 }
141
142 static std::shared_ptr<FormatType> MakeFormat() {
143 return std::make_shared<FormatType>();

Callers

nothing calls this directly

Calls 3

WriteJsonFunction · 0.85
FromStringFunction · 0.85
strMethod · 0.80

Tested by

no test coverage detected