The footer of a Parquet file is a FileMetaData structure in Apache
Thrift’s compact protocol, followed by its length (4 bytes, little-endian) and
PAR1. The structures below are from
parquet.thrift
in the parquet-format repository, read 2026-11-13 together with its README, Encryption.md,
PageIndex.md, BloomFilter.md and Compression.md; the number before each field is its Thrift
field ID, which is what the compact protocol stores. The file layout in the README is: the
magic PAR1, the column chunks of each row group in order (column 1 to N of row
group 1, then row group 2, and so on), the file metadata, the 4-byte little-endian length of
the file metadata, and PAR1. Readers read the footer first, then the column
chunks they need. There is no physical structure guaranteed for a row group, but a column
chunk is contiguous. A file may hold only the metadata (the README says a file “does not
need to actually contain the data”). Thrift field ID 32767 of every struct is reserved for
extensions, always of type binary (BinaryProtocolExtensions.md, not covered
here).
FileMetaData
| ID | Field | Type | Meaning |
|---|---|---|---|
| 1 | version | i32 | As of December 2025 there is no agreed meaning of version 2 of the file. Writers should always put 1; readers should accept 1 and 2 interchangeably. Other values are reserved. |
| 2 | schema | list<SchemaElement> | The schema tree, flattened depth first; the first element is the root. |
| 3 | num_rows | i64 | Rows in the file. |
| 4 | row_groups | list<RowGroup> | |
| 5 | key_value_metadata | list<KeyValue> | Application data. KeyValue: 1 key, 2 value. |
| 6 | created_by | string | The application that wrote the file and its version, in the format <Application> version <App Version> (build <App Build Hash>). |
| 7 | column_orders | list<ColumnOrder> | The sort order used for min_value/max_value in Statistics and min_values/max_values in the ColumnIndex, listed in schema order but for leaf columns only. Without it, the meaning of those fields is undefined, so a file that writes them must write column_orders. The obsolete min/max are always signed comparison. See ColumnOrder. |
| 8 | encryption_algorithm | EncryptionAlgorithm | Set only in encrypted files with a plaintext footer. See encryption. |
| 9 | footer_signing_key_metadata | binary | Retrieval metadata of the footer signing key; only in encrypted files with a plaintext footer. |
SchemaElement
| ID | Field | Meaning |
|---|---|---|
| 1 | type | Physical type; absent for groups. |
| 2 | type_length | For FIXED_LEN_BYTE_ARRAY, the byte length of the values. Otherwise, if specified, the maximum bit length needed for any value (for example 3 for a low-cardinality INT column); fixed for the whole file. |
| 3 | repetition_type | 0 REQUIRED (not null, exactly one value per row), 1 OPTIONAL (null or one value), 2 REPEATED (zero or more values). The root has none; every other node must have one. |
| 4 | name | Column or group name. |
| 5 | num_children | For groups: how many of the following elements are its children. |
| 6 | converted_type | Deprecated annotation recording the original type when the schema was converted from another model; superseded by logicalType (see converted types). |
| 7 | scale | Deprecated, for decimal data; superseded by the DECIMAL logical type, but format v1 implementations must set both. |
| 8 | precision | As scale. |
| 9 | field_id | The original field ID, when the source schema has field IDs. |
| 10 | logicalType | The logical type; replaces ConvertedType, but for format v1 compatibility an implementation using LogicalType must also set the matching ConvertedType (if any). See logical types. |
Physical types
| Value | Type | Plain encoding |
|---|---|---|
| 0 | BOOLEAN | 1 bit each, packed from the low bit |
| 1 | INT32 | 4 bytes, little-endian |
| 2 | INT64 | 8 bytes, little-endian |
| 3 | INT96 | 12 bytes, little-endian; deprecated (“new Parquet writers should not write data in INT96”) but used by legacy systems |
| 4 | FLOAT | IEEE 754, 4 bytes |
| 5 | DOUBLE | IEEE 754, 8 bytes |
| 6 | BYTE_ARRAY | 4-byte length, then the bytes |
| 7 | FIXED_LEN_BYTE_ARRAY | type_length bytes |
Converted types
Deprecated: superseded by LogicalType and not to be extended. The conversions are in
LogicalTypes.md (not covered here). Values as the schema’s comments give them: DECIMAL
annotates BYTE_ARRAY or FIXED_LEN_BYTE_ARRAY holding the unscaled value as big-endian two’s
complement, value × 10−scale, with precision and scale in the SchemaElement; DATE is
days since the Unix epoch in INT32; TIME_MILLIS is milliseconds since midnight in INT32;
TIME_MICROS is microseconds since midnight in INT64; TIMESTAMP_MILLIS and TIMESTAMP_MICROS are
milliseconds or microseconds since the Unix epoch in INT64; UINT_8, 16 and 32 and INT_8, 16 and
32 are stored in INT32, and the 64-bit ones in INT64; JSON is a document in one UTF8 column; BSON
is a document in one BYTE_ARRAY; ENUM is a BYTE_ARRAY; INTERVAL is a FIXED_LEN_BYTE_ARRAY of
length 12 of three little-endian unsigned integers: months, days and milliseconds. MAP is an
optional field containing a repeated key/value pair, MAP_KEY_VALUE a group of two fields, LIST an
optional field containing a repeated field for its values. The numbers: 0 UTF8, 1 MAP, 2 MAP_KEY_VALUE, 3
LIST, 4 ENUM, 5 DECIMAL, 6 DATE,
7 TIME_MILLIS, 8 TIME_MICROS, 9
TIMESTAMP_MILLIS, 10 TIMESTAMP_MICROS, 11
UINT_8, 12 UINT_16, 13 UINT_32, 14
UINT_64, 15 INT_8, 16 INT_16, 17
INT_32, 18 INT_64, 19 JSON, 20
BSON, 21 INTERVAL.
Logical types
LogicalType is a union; the field ID says which:
| ID | Logical type | Parameters |
|---|---|---|
| 1 | STRING | UTF-8 text in a BYTE_ARRAY |
| 2 | MAP | |
| 3 | LIST | |
| 4 | ENUM | |
| 5 | DECIMAL | 1 scale, 2 precision |
| 6 | DATE | Days since 1970-01-01 in INT32 |
| 7 | TIME | 1 isAdjustedToUTC, 2 unit |
| 8 | TIMESTAMP | 1 isAdjustedToUTC, 2 unit (TimeUnit: 1 MILLIS, 2 MICROS, 3 NANOS) |
| 10 | INTEGER | 1 bitWidth (8, 16, 32, 64), 2 isSigned |
| 11 | UNKNOWN | Always null |
| 12 | JSON | |
| 13 | BSON | |
| 14 | UUID | 16-byte FIXED_LEN_BYTE_ARRAY |
| 15 | FLOAT16 | 2-byte FIXED_LEN_BYTE_ARRAY |
| 16 | VARIANT | Embedded Variant values; specification_version |
| 17 | GEOMETRY | Well-Known Binary features with linear (planar) edges |
| 18 | GEOGRAPHY | As geometry, with an edge interpolation algorithm (0 spherical, 1 Vincenty, 2 Thomas, 3 Andoyer, 4 Karney) |
| 19 | FILE | A group referring to a file or a range of bytes, stored inline or in an external file |
| 20 | FINITE_VECTOR | The outer group of a LIST-like three-level structure in which every non-null vector has exactly num_elements elements |
ID 9 is reserved for INTERVAL. Rules from the schema comments: STRING, ENUM, JSON and BSON
need BYTE_ARRAY (STRING and ENUM must be UTF-8); UUID is a FIXED_LEN_BYTE_ARRAY of 16 bytes, raw
UUID bytes; FLOAT16 a FIXED_LEN_BYTE_ARRAY of 2 bytes; DATE needs INT32. DECIMAL: scale is zero or
positive and at most the precision, precision is positive, allowed for INT32, INT64,
FIXED_LEN_BYTE_ARRAY and BYTE_ARRAY. TIME: INT32 (millis) or INT64 (micros, nanos). TIMESTAMP:
INT64 or FIXED_LEN_BYTE_ARRAY with type_length 12. INTEGER: bitWidth
8, 16, 32 or 64, INT32 or INT64. UNKNOWN (NullType) is allowed for any physical type and marks a
column whose values are all null, its physical type guessed. GEOMETRY holds WKB in a BYTE_ARRAY with
linear edges and optional crs (default OGC:CRS84, longitude then latitude
on WGS84); GEOGRAPHY has optional crs (longitudes in [−180, 180], latitudes in
[−90, 90]) and algorithm (default SPHERICAL). VARIANT has an optional
specification_version (i8). FINITE_VECTOR has a required num_elements
(i32): each non-null vector must hold exactly that many elements, in the LIST three-level
structure. The detailed rules for each type are in LogicalTypes.md, Geospatial.md and the Variant
documents, which are not covered here. Map, list and the other empty-struct annotations carry no
parameters.
RowGroup
| ID | Field | Meaning |
|---|---|---|
| 1 | columns | list<ColumnChunk>, one per leaf column, in schema order. |
| 2 | total_byte_size | Uncompressed size of all column data. |
| 3 | num_rows | Rows in the group. |
| 4 | sorting_columns | list<SortingColumn>: 1 column_idx, 2 descending, 3 nulls_first. |
| 5 | file_offset | Where the group’s first page starts. |
| 6 | total_compressed_size | |
| 7 | ordinal | The group’s number in the file. |
ColumnChunk
| ID | Field | Meaning |
|---|---|---|
| 1 | file_path | File holding the column data, relative to this file; if not set it is this file. The schema says the only known use is summary “_metadata” files, which were never formally specified, and that reading externally stored column data is not part of the Parquet specification. |
| 2 | file_offset | Required in the schema, default 0. Deprecated and should not be used (implementations used it inconsistently); writers should set 0 if no ColumnMetaData was written outside the footer. |
| 3 | meta_data | ColumnMetaData. Marked optional, but most implementations require it, so writers MUST populate it. |
| 4, 5 | offset_index_offset, _length | File offset (i64) and size in bytes (i32) of the chunk’s OffsetIndex. |
| 6, 7 | column_index_offset, _length | File offset (i64) and size in bytes (i32) of the chunk’s ColumnIndex (per-page min and max). |
| 8 | crypto_metadata | For encrypted columns: a union, 1 ENCRYPTION_WITH_FOOTER_KEY (empty struct), 2 ENCRYPTION_WITH_COLUMN_KEY (1 path_in_schema, 2 key_metadata). See encryption. |
| 9 | encrypted_column_metadata | The ColumnMetaData, Thrift-serialised and encrypted with the column key. |
ColumnMetaData
| ID | Field | Meaning |
|---|---|---|
| 1 | type | Physical type. |
| 2 | encodings | Every encoding used in the chunk. |
| 3 | path_in_schema | Names from the root to the column. |
| 4 | codec | Compression codec. |
| 5 | num_values | Values, including nulls. |
| 6, 7 | total_uncompressed_size, total_compressed_size | Including page headers. |
| 8 | key_value_metadata | |
| 9 | data_page_offset | First data page. |
| 10 | index_page_offset | Unused. |
| 11 | dictionary_page_offset | The dictionary page, if any. |
| 12 | statistics | Statistics for the chunk. |
| 13 | encoding_stats | list<PageEncodingStats>: 1 page_type, 2 encoding, 3 count. |
| 14, 15 | bloom_filter_offset, bloom_filter_length | Where the column’s Bloom filter data is, from the start of the file, and its size. |
| 16 | size_statistics | For estimating memory use: unencoded byte-array data size and repetition and definition level histograms. |
| 17 | geospatial_statistics | For geometry and geography columns: a bounding box and the geospatial type codes present. |
Compression codecs
0 UNCOMPRESSED, 1 SNAPPY, 2 GZIP, 3
LZO, 4 BROTLI, 5 LZ4 (added in 2.4, now
deprecated), 6 ZSTD, 7 LZ4_RAW (added in 2.9).
Statistics
| ID | Field | Meaning |
|---|---|---|
| 1, 2 | max, min | Deprecated: binary, PLAIN-encoded except that byte arrays have no length prefix, determined by signed comparison only. New files should use max_value and min_value; to support older readers these may also be set when the column order is signed. |
| 3 | null_count | i64. Writers SHOULD always write it, even if zero or the column is not nullable. Readers MUST distinguish absent from 0 and MUST NOT assume 0 when absent. |
| 4 | distinct_count | i64, count of distinct values. |
| 5, 6 | max_value, min_value | Binary, lower and upper bounds determined by the column’s ColumnOrder. They may be the actual minimum and maximum or more compact values that do not occur (a writer may set min “B” and max “C” instead of “Blart Versenwald III”), but they must be valid values of the column’s logical type. Plain-encoded, except that variable-length byte arrays have no length prefix. |
| 7, 8 | is_max_value_exact, is_min_value_exact | bool: true when the value is the actual maximum or minimum. |
| 9 | nan_count | i64, NaN values; only for FLOAT or DOUBLE or the FLOAT16 logical type. When absent, readers MUST assume NaNs may be present. |
ColumnOrder
A union that names the order used for min_value and max_value
of a column. If a reader does not support the value, it should ignore the min and max
statistics for that column.
| ID | Member | Meaning |
|---|---|---|
| 1 | TYPE_ORDER | The order of the logical type, or of the physical type when there is none (below). |
| 2 | IEEE_754_TOTAL_ORDER | The totalOrder predicate of IEEE 754 (2008) section 5.10, only for FLOAT, DOUBLE and FLOAT16: -0 before +0, -NaN before everything, +NaN after everything, and an order between different bit patterns of one value. nan_count is mandatory; min and max hold the smallest and largest non-NaN values, or, when every non-null value is NaN, the smallest and largest NaN under this order. A reader compares nan_count + null_count == num_values to learn whether all non-null values are NaN; in the page index, a NaN in min_values or max_values means all non-null values of the page are NaN. |
| 3 | INT96_TIMESTAMP_ORDER | Chronological order, only for INT96. |
Orders under TYPE_ORDER: unsigned byte-wise comparison for UTF8, JSON, BSON, ENUM,
BYTE_ARRAY and FIXED_LEN_BYTE_ARRAY; signed comparison for INT8 to INT64, INT32, INT64, DATE, TIME_*
and TIMESTAMP_*; unsigned comparison for UINT8 to UINT64; signed comparison of the
represented value for DECIMAL, FLOAT16, FLOAT and DOUBLE; false before true for BOOLEAN;
undefined for INTERVAL, LIST, MAP, VARIANT, GEOMETRY, GEOGRAPHY, FILE and FINITE_VECTOR.
For INT96 (deprecated; statistics optional) writers that emit statistics should use
INT96_TIMESTAMP_ORDER and order by the last 4 bytes (days) as a little-endian
signed 32-bit integer, then if equal the first 8 bytes (nanoseconds) as a little-endian signed
64-bit integer; if TYPE_ORDER is used for INT96, readers should ignore all its
statistics.
Because TYPE_ORDER is ambiguous for floating point (NaN and ±0), writers are
advised to use IEEE_754_TOTAL_ORDER. When reading statistics of floating-point columns
under TYPE_ORDER: ignore a NaN min or max; a min of +0 may still allow −0
values, and a max of −0 may still allow +0; when searching for NaN ignore min and max and
use nan_count. When writing them: always set nan_count; min and
max must not contain NaN and come from non-NaN values (so readers can rely on them); if
every non-null value is NaN write neither; a computed max of zero is written as +0.0 and a
computed min of zero as −0.0. The same applies to column index entries, except that if all
non-null values of a page are NaN no column index may be written for the chunk.
Size and geospatial statistics
SizeStatistics (ColumnMetaData 16)
| ID | Field | Meaning |
|---|---|---|
| 1 | unencoded_byte_array_data_bytes | i64. For BYTE_ARRAY columns only: bytes of the values without encoding, excluding the 4-byte length of each, that is the PLAIN size minus 4 × the number of values. Example: dictionary [“a”, “bc”, “cde”] and indices [0, 0, 1, 2] give 7. |
| 2 | repetition_level_histogram | list<i64>: one entry per repetition level (max level + 1), the number of times it occurs. May be omitted when the maximum repetition level is 0. |
| 3 | definition_level_histogram | list<i64>: the same for definition levels; may be omitted when the maximum definition level is 0 or 1. |
GeospatialStatistics (ColumnMetaData 17)
Field 1 bbox: a BoundingBox with required doubles 1 xmin, 2 xmax,
3 ymin, 4 ymax and optional 5 zmin, 6 zmax,
7 mmin, 8 mmax. Field 2 geospatial_types: list<i32> of the
geospatial type codes of all instances, or empty if not known. The type code meanings are in
Geospatial.md, not covered here.
ColumnMetaData details
total_uncompressed_size and total_compressed_size count all pages in the
chunk including their headers (the compressed one after any encryption).
dictionary_page_offset is the first (and only) dictionary page.
bloom_filter_length (added in 2.10) includes the serialised
BloomFilterHeader; writers should write it so a
reader can fetch the filter in one read, and it can otherwise be found after reading the header.
encoding_stats lists PageEncodingStats (page type, encoding, count of pages) and can
show whether all data pages are dictionary encoded. index_page_offset points to a
root index page. RowGroup file_offset is the first page (data or dictionary);
RowGroup columns must be in schema order.
Page index
Optional per-chunk structures stored near the footer, away from the row groups, so that readers not doing selective scans do not pay for them; their position and length are in the ColumnChunk. They need data pages that start and end at row boundaries (repetition level 0).
OffsetIndex
| ID | Field | Meaning |
|---|---|---|
| 1 | page_locations | list<PageLocation> ordered by increasing offset, with first_row_index strictly increasing. PageLocation: 1 offset (i64, page position in the file), 2 compressed_page_size (i32, including the header: the page header’s compressed_page_size plus the serialised PageHeader size), 3 first_row_index (i64, index of the page’s first row within the row group). |
| 2 | unencoded_byte_array_data_bytes | list<i64>, per page, as in SizeStatistics. |
An OffsetIndex may exist without a ColumnIndex.
ColumnIndex
If present, the OffsetIndex must be too. Entry i of each list belongs to
page_locations[i].
| ID | Field | Meaning |
|---|---|---|
| 1 | null_pages | list<bool>: true if the page holds only nulls; the page’s min and max entries are then empty (byte[0]) so all lists have the same length. |
| 2, 3 | min_values, max_values | list<binary>: lower and upper bound per page by the column order; they may be truncated bounds that do not occur. Readers must check null_pages before using an entry. NaN must not be included for FLOAT, DOUBLE or FLOAT16; for INT96 a column index may only be written with INT96_TIMESTAMP_ORDER. If all non-null values of a page are NaN: under TYPE_ORDER no column index is written; under IEEE754_TOTAL_ORDER the entries hold the smallest and largest NaN. |
| 4 | boundary_order | BoundaryOrder: 0 UNORDERED, 1 ASCENDING, 2 DESCENDING, for both lists (allowing binary search). Readers cannot assume max_values[i] <= min_values[i+1]. |
| 5 | null_counts | list<i64>, nulls per page; writers SHOULD always write it; readers MUST NOT assume zeros when absent. |
| 6, 7 | repetition_level_histograms, definition_level_histograms | list<i64>: the per-page histograms of SizeStatistics concatenated; length is the number of pages × (max level + 1). |
| 8 | nan_counts | list<i64> per page, for FLOAT, DOUBLE and FLOAT16; absent means NaNs may be in any page. |
Readers that use the ColumnIndex should not also use page statistics; writing page statistics
alongside is only for older readers. For an ordered column a reader can binary-search the
bounds; otherwise it reads them in sequence. The first page’s lower bound and the last page’s upper
bound are included for uniformity although the row group statistics also give them. The
min_values and max_values follow column_orders.
Modular encryption
From Encryption.md. Each “module” (page, page header, column index, offset index, Bloom
filter header and bitset, column metadata, footer) is encrypted separately. Algorithms
(the EncryptionAlgorithm union): 1 AES_GCM_V1, everything with AES GCM
(no padding); 2 AES_GCM_CTR_V1, every module with GCM except pages, which use AES
CTR (so page tampering may go unnoticed). Key sizes 128, 192 or 256 bits. Both structures hold
1 aad_prefix (binary, optional), 2 aad_file_unique (binary, optional,
the file’s unique identifier part of the AAD suffix) and 3 supply_aad_prefix (bool,
optional; true when the prefix was not stored and readers must supply it).
Module serialisation
GCM: a 4-byte little-endian length of the buffer, then a 12-byte nonce, the ciphertext (length − 28 bytes) and a 16-byte tag. CTR (pages in AES_GCM_CTR_V1): the 4-byte length, a 12-byte nonce and the ciphertext (length − 12 bytes); the 16-byte IV is the nonce followed by a 4-byte counter whose first 31 bits are 0 and last bit is 1. The nonce is random, 12 bytes, per module. One key must not be used for more than 232 module encryptions (so at most 231 pages).
AAD
The AAD is the optional prefix followed by a suffix built from: the file’s unique identifier
(all modules); the module type (1 byte, all modules); the row group ordinal (2-byte little-endian,
all but the footer); the column ordinal (2 bytes, all but the footer); the page ordinal (2 bytes,
data pages and data page headers only). Module types: 0 Footer, 1 ColumnMetaData, 2 Data Page,
3 Dictionary Page, 4 Data Page Header, 5 Dictionary Page Header, 6 ColumnIndex, 7 OffsetIndex,
8 BloomFilter Header, 9 BloomFilter Bitset. The row group ordinal may be a local counter or
RowGroup.ordinal.
File modes
- Encrypted footer: the file starts and ends with the magic
PARE. Before the encrypted footer a Thrift-serialisedFileCryptoMetaDatais written: 1encryption_algorithm(required, EncryptionAlgorithm), 2key_metadata(optional binary, footer key retrieval metadata). Then the combined length of that structure and the encrypted footer (4 bytes little-endian), thenPARE. Columns that use the footer key keep theirmeta_datain the footer; columns with their own key have nometa_dataand carryencrypted_column_metadata. - Plaintext footer: the magic stays
PAR1so older readers can read unencrypted columns.meta_datais set for all columns but stripped of statistics for encrypted ones, which are inencrypted_column_metadata. The footer is signed: the serialised FileMetaData is encrypted with AES GCM using the footer signing key and the AAD, and only the 12-byte nonce and 16-byte tag (28 bytes) are stored after the footer; the 4-byte length that follows counts the footer and signature together.encryption_algorithmandfooter_signing_key_metadataare set in FileMetaData.
Column key_metadata is an arbitrary byte array chosen by the writer; the format does
not say what it holds. A Bloom filter of an encrypted column has its header and bitset encrypted
separately as module types 8 and 9, each with the length written first.
Thrift compact protocol
All structures are serialised with Thrift’s compact protocol (from Apache Thrift’s compact protocol specification, read 2026-11-13).
- Varint (ULEB128): 7 bits at a time from the least significant, the top bit set on every byte but the last. 50399 is
DF 89 03. - ZigZag:
(n << 1) ^ (n >> 63), back:(n >>> 1) ^ −(n & 1); 0 → 0, −1 → 1, 1 → 2, −2 → 3. - Integers: i8 is one byte; i16, i32 and i64 are ZigZag then varint. Enums are their integer value.
- Binary and string: the byte length as a plain varint (not ZigZag), then the bytes; strings are UTF-8 with no terminator.
- Double: IEEE 754, 8 bytes, little-endian.
- Bool: in a struct field it is in the field header (type 1 true, 2 false, no value bytes); as a list or map element it is a byte, 1 true and 2 false, and readers must accept both 1 and 2 for either source because implementations disagreed.
- Struct: fields, then a stop byte
00. A field header is one byteddddttttwhen the field id delta (this id minus the previous id, or the id itself for the first field) is 1 to 15; otherwise0000ttttfollowed by the field id as a ZigZag varint. A union is a struct with at most one field. - Field types: 1 BOOLEAN_TRUE, 2 BOOLEAN_FALSE, 3 I8, 4 I16, 5 I32, 6 I64, 7 DOUBLE, 8 BINARY, 9 LIST, 10 SET, 11 MAP, 12 STRUCT, 13 UUID. Element types are the same numbers, with BOOL as 1 or 2.
- List and set: one byte
ssssttttfor sizes 0 to 14; for 15 and above the byte1111ttttfollowed by the size as a plain unsigned varint; then the elements. - Map: size as a varint; if it is 0 nothing else; otherwise a byte
kkkkvvvvwith the key and value types, then the pairs. - UUID: the 16 bytes unmodified (big-endian standard form).
Unknown fields can be skipped by their type. Parquet’s Thrift definitions use only the struct, union, list, i8, i16, i32, i64, double, bool, binary and string forms.