Typed columns inside stripes
How ORC's typed column streams, stripes, and statistics shape efficient reading and writing for repeated analytical workloads. · associate
ORC is a schema-aware, columnar file format for repeated analytical reads. Its schema records types such as integers, decimals, timestamps, strings, and nested structures. A compatible reader interprets these types without inferring each value from text.
An ORC file contains stripes, each holding a batch of rows organized into column-oriented streams. A column can have several streams: for example, information about null values can be separate from the encoded values. A stripe also contains index information and a stripe footer describing its streams and encodings. The file tail supplies metadata needed to locate and interpret the stripes.
This layout enables column projection: reading the columns needed by a query rather than every field value. For SELECT amount WHERE fraud_label = true, the reader needs both the output column and the filter column, but can avoid unrelated columns such as a long description. Metadata and supporting streams still require some reading.
| Layout element | What it holds | Reading benefit |
|---|---|---|
| Typed column streams | Encoded column information | Read needed columns |
| Stripe | A batch of rows | Process selected batches |
| File tail | Schema and layout metadata | Locate and interpret data |