| 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>(); |
nothing calls this directly
no test coverage detected