Skip to content

Evidence methods guide

ORC Stripe Statistics and Schema Review: Check What the Footer Can Support

Review ORC file versions, schema columns, stripes, file and row indexes, column statistics, bloom filters, and footer evidence before relying on pruning.

ORC metadata can support bounded decisions about where values may be located, but statistics are not a substitute for reading the data. Start with the detected ORC version and schema, then map stripe boundaries, footer references, file and stripe statistics, row indexes, and optional bloom filters. Keep a pruning decision distinct from completeness, semantic correctness, or application quality. This guide is a metadata worksheet, not a query engine, file repair, privacy decision, or permission claim.

Updated

On this page

Identify the file version and metadata boundary

Record a neutral artifact ID, digest, file length, detected ORC version, reader version, and the byte ranges or offsets the reader reports for the postscript, footer, metadata, and stripes. The Apache ORC, (opens in a new tab) page describes more than one released file version and says a library detects the version before choosing a reader. Do not infer the version from a filename or from a reader default.

The source dates in this guide use 22 October 2026 as retrieval evidence for documentation without a verified publication date. They are not publication claims. Where a verified publication date is available, it is recorded in the source ledger.

Identify the file version and metadata boundary (table)
Boundary fieldRecordStop if
Format versionDetected version and detection methodReader version is the only evidence
File lengthObserved length and declared footer spanFooter range exceeds file length
PostscriptPresent, decoded, and linked to footerReader guesses a missing length
FooterSchema and stripe referencesFooter is read from a repaired copy only
MetadataStripe and row index referencesMetadata is silently skipped
CompressionCodec and block boundary evidenceBytes are interpreted without decompression context

Keep the raw tail or a bounded structural digest with the normalized report. If a reader repairs a footer or ignores an unknown field, record that as reader behavior. A parsed footer does not prove every row is present or every column value is semantically valid.

Compare schema identity before reading statistics

Record each column path or field ID, declared type, nested structure, nullability policy if available, and the schema reference used by the reader. ORC files are written with a schema that defines the column tree. Keep the source schema and any projected query schema separate. A projection can omit a column without proving that the source did not contain it.

Compare schema identity before reading statistics (table)
Schema evidenceSafe observationOpen question
Column IDStable identifier used by metadataDid a transform remap IDs?
Column pathNested path and parent relationshipDoes a flat label hide a nested field?
TypeDeclared primitive or complex typeWere values coerced during export?
Row countFile or stripe count with source fieldIs the count from all stripes?
Null policyNull count or not recordedAre missing and null distinct?
ProjectionRequested columns and omitted columnsCould pruning hide needed evidence?

Use a synthetic schema with symbolic fields to test your worksheet. Do not copy real column names, values, or operational labels into a public packet. Record schema drift as a versioned change, not as a cleanup of the latest file.

Keep stripe statistics tied to their stripe and column

The Apache ORC, (opens in a new tab) documentation describes file, stripe, and row levels. For every statistic, record its level, stripe identity, column identity, count, null presence, minimum and maximum when supplied, numeric sum when supplied, and the method or reader that produced it. A file-level minimum cannot answer which stripe contains a value. A stripe-level maximum does not prove that every row is within the range if the statistic is missing or stale.

Keep stripe statistics tied to their stripe and column (table)
Statistic evidenceDecision it can supportCannot prove
File-level min or maxA bounded file candidate for a predicateWhich row or stripe owns the value
Stripe-level min or maxA bounded stripe candidateComplete row coverage
Value countCount recorded at the index levelDistinct count or data quality
Null presenceA null state was observedWhy a value is null
Numeric sumA recorded aggregate in the statisticIndependent recomputation
Bloom filterPossible membership pruningNo false positives or semantic match

Synthetic stripe ledger

Keep stripe statistics tied to their stripe and column code example, JSON
{"file":"fixture-orc-01","version":"fixture-v1","schema":[{"id":"fixture-1","path":"events.count","type":"int"}],"stripes":[{"id":"stripe-a","rows":"fixture-count","stats":{"count":"fixture-count","has_null":"fixture-boolean","min":"fixture-min","max":"fixture-max"},"decision":"candidate-only"}]}

Separate row indexes, seek positions, and pruning decisions

Apache ORC describes row indexes as statistics for sets of rows within a stripe plus a position for seeking to the row group. Record the row group boundary, column, statistics, seek position, and whether the reader used it. A pruning decision is conditional on the predicate, the exact statistic, null behavior, and reader implementation. It is not a proof that an omitted stripe or row group contains no relevant data.

Separate row indexes, seek positions, and pruning decisions (table)
Review questionRecordHold when
PredicateExact normalized predicate and typeA string comparison is applied to a numeric field
Index levelFile, stripe, or row groupThe report does not identify level
Seek positionReader position and row groupPosition is missing or inconsistent
Null handlingHow nulls affect the predicateNulls are treated as ordinary values
Bloom filterPresent, absent, or unavailableFilter version or column is unknown
Read resultRows scanned and whyA pruned result is treated as complete

Stop before relying on an incomplete footer

Stop conditions

  • Stop if the format version, footer span, compression boundary, or reader version is unknown.
  • Stop if schema column IDs or nested paths cannot be matched to statistics.
  • Stop if file, stripe, and row index levels are mixed in one summary.
  • Stop if a missing statistic is treated as an empty range or a null count is treated as data quality.
  • Stop if a bloom filter or pruning result is used without recording its column, predicate, and reader behavior.
  • Stop before sampling real rows when the footer or column labels disclose private operational data.

Pair this worksheet with the data provenance log for writer and reader history and the data card template for collection context. Footer evidence can bound a read; it cannot prove completeness, ownership, privacy clearance, or permission.

For a supported non-health collection, after the owner has authority to describe the scope and a controlled metadata packet, the qualified appraisal request path may be a preparation step. It does not read ORC stripes, run a query, certify pruning, create a quote, match a buyer, or grant a license.

Sources

  1. Apache ORC: ORC Specification (opens in a new tab)
  2. Apache ORC: Indexes (opens in a new tab)

Use the appraisal path after the ORC metadata packet is organized.

It does not read ORC stripes, run a query, certify pruning, create a quote, match a buyer, or grant a license.