MCPcopy Create free account
hub / github.com/apache/datafusion / serialize

Method serialize

datafusion/datasource-json/src/file_format.rs:400–405  ·  view source on GitHub ↗
(&self, batch: RecordBatch, _initial: bool)

Source from the content-addressed store, hash-verified

398
399impl BatchSerializer for JsonSerializer {
400 fn serialize(&self, batch: RecordBatch, _initial: bool) -> Result<Bytes> {
401 let mut buffer = Vec::with_capacity(4096);
402 let mut writer = json::LineDelimitedWriter::new(&mut buffer);
403 writer.write(&batch)?;
404 Ok(Bytes::from(buffer))
405 }
406}
407
408/// Implements [`DataSink`] for writing to a Json file.

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected