Expand description
A CSV file as chunks.
The same shape as rudb-parquet’s reader on purpose, because the operator above them is the same
operator with a different constructor: open, ask what the columns are, say which of them you
want, then pull chunks until there are none. A caller that can read one can read the other.
The file is read in blocks and a record that straddles a block boundary is carried into the next one, so a file larger than memory reads the same as a small one. The sample the sniffer looks at is the first block, which is also the first block the reader then goes on to use, so opening a file reads its front once.
A reader can also cover a stretch of a file rather than all of it, which is what crate::split
hands each thread. It starts where it is told a record starts and takes the records that start
before its end, reading past the end only to finish the last of them.
Structs§
- Reader
- A CSV file, positioned at a record boundary.