package format

Import Path
	github.com/parquet-go/parquet-go/format (on go.dev)

Dependency Relation
	imports 2 packages, and imported by 17 packages

Involved Source Files parquet.go
Package-Level Type Names (total 57)
/* sort by: | */
Unique file identifier part of AAD suffix. AAD prefix. In files encrypted with AAD prefix without storing it, readers must supply the prefix.
Unique file identifier part of AAD suffix. AAD prefix. In files encrypted with AAD prefix without storing it, readers must supply the prefix.
The algorithm used in Bloom filter. Block *SplitBlockAlgorithm
The hash function used in Bloom filter. This function takes the hash of a column value using plain encoding. XxHash *XxHash
Bloom filter header is stored at beginning of Bloom filter data of each column and followed by its bitset. The algorithm for setting bits. The compression used in the Bloom filter. The hash function used for Bloom filter. The size of bitset in bytes.
The compression used in the Bloom filter.
Enum to annotate whether lists of min/max elements inside ColumnIndex are ordered and if so, in which direction. ( BoundaryOrder) String() string BoundaryOrder : expvar.Var BoundaryOrder : fmt.Stringer const Ascending const Descending const Unordered
Embedded BSON logical type annotation Allowed for physical types: BINARY (*BsonType) String() string *BsonType : expvar.Var *BsonType : fmt.Stringer
Size of ColumnChunk's ColumnIndex, in bytes. File offset of ColumnChunk's ColumnIndex. Crypto metadata of encrypted columns. Encrypted column metadata for this chunk. Byte offset in file_path to the ColumnMetaData. File where column data is stored. If not set, assumed to be same file as metadata. This path is relative to the current file. Column metadata for this chunk. This is the same content as what is at file_path/file_offset. Having it here has it replicated in the file metadata. Size of ColumnChunk's OffsetIndex, in bytes. File offset of ColumnChunk's OffsetIndex.
Description for ColumnIndex. Each <array-field>[i] refers to the page at OffsetIndex.PageLocations[i] Stores whether both min_values and max_values are ordered and if so, in which direction. This allows readers to perform binary searches in both lists. Readers cannot assume that max_values[i] <= min_values[i+1], even if the lists are ordered. MaxValues [][]byte Two lists containing lower and upper bounds for the values of each page determined by the ColumnOrder of the column. These may be the actual minimum and maximum values found on a page, but can also be (more compact) values that do not exist on a page. For example, instead of storing ""Blart Versenwald III", a writer may set min_values[i]="B", max_values[i]="C". Such more compact values must still be valid values within the column's logical type. Readers must make sure that list entries are populated before using them by inspecting null_pages. A list containing the number of null values for each page. A list of Boolean values to determine the validity of the corresponding min and max values. If true, a page contains only null values, and writers have to set the corresponding entries in min_values and max_values to byte[0], so that all lists have the same length. If false, the corresponding entries in min_values and max_values must be valid. func github.com/parquet-go/parquet-go.ColumnIndexer.ColumnIndex() ColumnIndex func github.com/parquet-go/parquet-go.(*File).ColumnIndexes() []ColumnIndex func github.com/parquet-go/parquet-go.(*File).ReadPageIndex() ([]ColumnIndex, []OffsetIndex, error) func github.com/parquet-go/parquet-go.NewColumnIndex(kind parquet.Kind, index *ColumnIndex) parquet.ColumnIndex
Description for column metadata. Byte offset from beginning of file to Bloom filter data. Compression codec. Byte offset from beginning of file to first data page. Byte offset from the beginning of file to first (only) dictionary page. Set of all encodings used for this column. The purpose is to validate whether we can decode those pages. Set of all encodings used for pages in this column chunk. This information can be used to determine if all data pages are dictionary encoded for example. Byte offset from beginning of file to root index page. Optional key/value metadata. Number of values in this column. Path in schema. optional statistics for this column chunk. Total byte size of all compressed, and potentially encrypted, pages in this column chunk (including the headers). Total byte size of all uncompressed pages in this column chunk (including the headers). Type of this column.
Union to specify the order used for the min_value and max_value fields for a column. This union takes the role of an enhanced enum that allows rich elements (which will be needed for a collation-based ordering in the future). Possible values are: TypeDefinedOrder - the column uses the order defined by its logical or physical type (if there is no logical type). If the reader does not support the value of this union, min and max stats for this column should be ignored. The sort orders for logical types are: UTF8 - unsigned byte-wise comparison INT8 - signed comparison INT16 - signed comparison INT32 - signed comparison INT64 - signed comparison UINT8 - unsigned comparison UINT16 - unsigned comparison UINT32 - unsigned comparison UINT64 - unsigned comparison DECIMAL - signed comparison of the represented value DATE - signed comparison TIME_MILLIS - signed comparison TIME_MICROS - signed comparison TIMESTAMP_MILLIS - signed comparison TIMESTAMP_MICROS - signed comparison INTERVAL - unsigned comparison JSON - unsigned byte-wise comparison BSON - unsigned byte-wise comparison ENUM - unsigned byte-wise comparison LIST - undefined MAP - undefined In the absence of logical types, the sort order is determined by the physical type: BOOLEAN - false, true INT32 - signed comparison INT64 - signed comparison INT96 (only used for legacy timestamps) - undefined FLOAT - signed comparison of the represented value (*) DOUBLE - signed comparison of the represented value (*) BYTE_ARRAY - unsigned byte-wise comparison FIXED_LEN_BYTE_ARRAY - unsigned byte-wise comparison (*) Because the sorting order is not specified properly for floating point values (relations vs. total ordering) the following compatibility rules should be applied when reading statistics: - If the min is a NaN, it should be ignored. - If the max is a NaN, it should be ignored. - If the min is +0, the row group may contain -0 values as well. - If the max is -0, the row group may contain +0 values as well. - When looking for NaN values, min and max should be ignored. func github.com/parquet-go/parquet-go.Type.ColumnOrder() *ColumnOrder
Supported compression algorithms. Codecs added in format version X.Y can be read by readers based on X.Y and later. Codec support may vary between readers based on the format version and libraries available at runtime. See Compression.md for a detailed specification of these algorithms. ( CompressionCodec) String() string CompressionCodec : expvar.Var CompressionCodec : fmt.Stringer func github.com/parquet-go/parquet-go/compress.Codec.CompressionCodec() CompressionCodec func github.com/parquet-go/parquet-go/compress/brotli.(*Codec).CompressionCodec() CompressionCodec func github.com/parquet-go/parquet-go/compress/gzip.(*Codec).CompressionCodec() CompressionCodec func github.com/parquet-go/parquet-go/compress/lz4.(*Codec).CompressionCodec() CompressionCodec func github.com/parquet-go/parquet-go/compress/snappy.(*Codec).CompressionCodec() CompressionCodec func github.com/parquet-go/parquet-go/compress/uncompressed.(*Codec).CompressionCodec() CompressionCodec func github.com/parquet-go/parquet-go/compress/zstd.(*Codec).CompressionCodec() CompressionCodec func github.com/parquet-go/parquet-go.LookupCompressionCodec(codec CompressionCodec) compress.Codec const Brotli const Gzip const Lz4 const Lz4Raw const LZO const Snappy const Uncompressed const Zstd
Data page header. Encoding used for definition levels. Encoding used for this data page. Number of values, including NULLs, in this data page. Encoding used for repetition levels. Optional statistics for the data in this page.
New page format allowing reading levels without decompressing the data Repetition and definition levels are uncompressed The remaining section containing the data is compressed if is_compressed is true. Length of the definition levels. Encoding used for data in this page. Whether the values are compressed. Which means the section of the page between definition_levels_byte_length + repetition_levels_byte_length + 1 and compressed_page_size (included) is compressed with the compression_codec. If missing it is considered compressed. Number of NULL values, in this data page. Number of non-null = num_values - num_nulls which is also the number of values in the data section. Number of rows in this data page. which means pages change on record boundaries (r = 0). Number of values, including NULLs, in this data page. Length of the repetition levels. Optional statistics for the data in this page.
(*DateType) String() string *DateType : expvar.Var *DateType : fmt.Stringer
Decimal logical type annotation To maintain forward-compatibility in v1, implementations using this logical type must also set scale and precision on the annotated SchemaElement. Allowed for physical types: INT32, INT64, FIXED, and BINARY Precision int32 Scale int32 (*DecimalType) String() string *DecimalType : expvar.Var *DecimalType : fmt.Stringer
The dictionary page must be placed at the first position of the column chunk if it is partly or completely dictionary encoded. At most one dictionary page can be placed in a column chunk. Encoding using this dictionary page. If true, the entries in the dictionary are sorted in ascending order. Number of values in the dictionary.
Encodings supported by Parquet. Not all encodings are valid for all types. These enums are also used to specify the encoding of definition and repetition levels. See the accompanying doc for the details of the more complicated encodings. ( Encoding) String() string Encoding : expvar.Var Encoding : fmt.Stringer func github.com/parquet-go/parquet-go.DataPageHeader.DefinitionLevelEncoding() Encoding func github.com/parquet-go/parquet-go.DataPageHeader.Encoding() Encoding func github.com/parquet-go/parquet-go.DataPageHeader.RepetitionLevelEncoding() Encoding func github.com/parquet-go/parquet-go.DataPageHeaderV1.DefinitionLevelEncoding() Encoding func github.com/parquet-go/parquet-go.DataPageHeaderV1.Encoding() Encoding func github.com/parquet-go/parquet-go.DataPageHeaderV1.RepetitionLevelEncoding() Encoding func github.com/parquet-go/parquet-go.DataPageHeaderV2.DefinitionLevelEncoding() Encoding func github.com/parquet-go/parquet-go.DataPageHeaderV2.Encoding() Encoding func github.com/parquet-go/parquet-go.DataPageHeaderV2.RepetitionLevelEncoding() Encoding func github.com/parquet-go/parquet-go.DictionaryPageHeader.Encoding() Encoding func github.com/parquet-go/parquet-go.PageHeader.Encoding() Encoding func github.com/parquet-go/parquet-go/encoding.Encoding.Encoding() Encoding func github.com/parquet-go/parquet-go/encoding.NotSupported.Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/bitpacked.(*Encoding).Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/bytestreamsplit.(*Encoding).Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/delta.(*BinaryPackedEncoding).Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/delta.(*ByteArrayEncoding).Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/delta.(*LengthByteArrayEncoding).Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/plain.(*DictionaryEncoding).Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/plain.(*Encoding).Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/rle.(*DictionaryEncoding).Encoding() Encoding func github.com/parquet-go/parquet-go/encoding/rle.(*Encoding).Encoding() Encoding func github.com/parquet-go/parquet-go.LookupEncoding(enc Encoding) encoding.Encoding const BitPacked const ByteStreamSplit const DeltaBinaryPacked const DeltaByteArray const DeltaLengthByteArray const Plain const PlainDictionary const RLE const RLEDictionary
AesGcmCtrV1 *AesGcmCtrV1 AesGcmV1 *AesGcmV1
Retrieval metadata of column encryption key. Column path in schema.
(*EnumType) String() string *EnumType : expvar.Var *EnumType : fmt.Stringer
Representation of Schemas. ( FieldRepetitionType) String() string FieldRepetitionType : expvar.Var FieldRepetitionType : fmt.Stringer const Optional const Repeated const Required
Crypto metadata for files with encrypted footer. Encryption algorithm. This field is only used for files with encrypted footer. Files with plaintext footer store algorithm id inside footer (FileMetaData structure). Retrieval metadata of key used for encryption of footer, and (possibly) columns.
Description for file metadata. Sort order used for the min_value and max_value fields in the Statistics objects and the min_values and max_values fields in the ColumnIndex objects of each column in this file. Sort orders are listed in the order matching the columns in the schema. The indexes are not necessary the same though, because only leaf nodes of the schema are represented in the list of sort orders. Without column_orders, the meaning of the min_value and max_value fields in the Statistics object and the ColumnIndex object is undefined. To ensure well-defined behavior, if these fields are written to a Parquet file, column_orders must be written as well. The obsolete min and max fields in the Statistics object are always sorted by signed comparison regardless of column_orders. String for application that wrote this file. This should be in the format <Application> version <App Version> (build <App Build Hash>). e.g. impala version 1.0 (build 6cf94d29b2b7115df4de2c06e2ab4326d721eb55) Encryption algorithm. This field is set only in encrypted files with plaintext footer. Files with encrypted footer store algorithm id in FileCryptoMetaData structure. Retrieval metadata of key used for signing the footer. Used only in encrypted files with plaintext footer. Optional key/value metadata. Number of rows in this file. Row groups in this file. Parquet schema for this file. This schema contains metadata for all the columns. The schema is represented as a tree with a single root. The nodes of the tree are flattened to a list by doing a depth-first traversal. The column metadata contains the path in the schema for that column which can be used to map columns to nodes in the schema. The first element is the root. Version of this file. func github.com/parquet-go/parquet-go.(*File).Metadata() *FileMetaData
type IndexPageHeader (struct)
Integer logical type annotation bitWidth must be 8, 16, 32, or 64. Allowed for physical types: INT32, INT64 BitWidth int8 IsSigned bool (*IntType) String() string *IntType : expvar.Var *IntType : fmt.Stringer
Embedded JSON logical type annotation Allowed for physical types: BINARY (*JsonType) String() string *JsonType : expvar.Var *JsonType : fmt.Stringer
Wrapper struct to store key values. Key string Value string
(*ListType) String() string *ListType : expvar.Var *ListType : fmt.Stringer
LogicalType annotations to replace ConvertedType. To maintain compatibility, implementations using LogicalType for a SchemaElement must also set the corresponding ConvertedType (if any) from the following table. // use ConvertedType BSON // use ConvertedType Date // use ConvertedType Decimal + SchemaElement.{Scale, Precision} // use ConvertedType Enum 9: reserved for Interval // use ConvertedType Int* or Uint* // use ConvertedType JSON // use ConvertedType List // use ConvertedType Map use ConvertedType TimeMicros for Time{IsAdjustedToUTC: *, Unit: Micros} use ConvertedType TimeMillis for Time{IsAdjustedToUTC: *, Unit: Millis} use ConvertedType TimestampMicros for Timestamp{IsAdjustedToUTC: *, Unit: Micros} use ConvertedType TimestampMillis for Timestamp{IsAdjustedToUTC: *, Unit: Millis} // use ConvertedType UTF8 // no compatible ConvertedType // no compatible ConvertedType (*LogicalType) String() string *LogicalType : expvar.Var *LogicalType : fmt.Stringer func github.com/parquet-go/parquet-go.Type.LogicalType() *LogicalType func github.com/polarsignals/frostdb/query/logicalplan.ValidateComparingTypes(columnType *LogicalType, literal scalar.Scalar) *logicalplan.ExprValidationError
(*MapType) String() string *MapType : expvar.Var *MapType : fmt.Stringer
(*MicroSeconds) String() string *MicroSeconds : expvar.Var *MicroSeconds : fmt.Stringer
Time units for logical types. (*MilliSeconds) String() string *MilliSeconds : expvar.Var *MilliSeconds : fmt.Stringer
(*NanoSeconds) String() string *NanoSeconds : expvar.Var *NanoSeconds : fmt.Stringer
Logical type to annotate a column that is always null. Sometimes when discovering the schema of existing data, values are always null and the physical type can't be determined. This annotation signals the case where the physical type was guessed from all null values. (*NullType) String() string *NullType : expvar.Var *NullType : fmt.Stringer
PageLocations, ordered by increasing PageLocation.offset. It is required that page_locations[i].first_row_index < page_locations[i+1].first_row_index. func github.com/parquet-go/parquet-go.(*File).OffsetIndexes() []OffsetIndex func github.com/parquet-go/parquet-go.(*File).ReadPageIndex() ([]ColumnIndex, []OffsetIndex, error)
Statistics of a given page type and encoding. Number of pages of this type with this encoding. Encoding of the page. The page type (data/dic/...).
The 32bit CRC for the page, to be be calculated as follows: - Using the standard CRC32 algorithm - On the data only, i.e. this header should not be included. 'Data' hereby refers to the concatenation of the repetition levels, the definition levels and the column value, in this exact order. - On the encoded versions of the repetition levels, definition levels and column values. - On the compressed versions of the repetition levels, definition levels and column values where possible; - For v1 data pages, the repetition levels, definition levels and column values are always compressed together. If a compression scheme is specified, the CRC shall be calculated on the compressed version of this concatenation. If no compression scheme is specified, the CRC shall be calculated on the uncompressed version of this concatenation. - For v2 data pages, the repetition levels and definition levels are handled separately from the data and are never compressed (only encoded). If a compression scheme is specified, the CRC shall be calculated on the concatenation of the uncompressed repetition levels, uncompressed definition levels and the compressed column values. If no compression scheme is specified, the CRC shall be calculated on the uncompressed concatenation. - In encrypted columns, CRC is calculated after page encryption; the encryption itself is performed after page compression (if compressed) If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read. Compressed (and potentially encrypted) page size in bytes, not including this header. Headers for page specific data. One only will be set. DataPageHeaderV2 *DataPageHeaderV2 DictionaryPageHeader *DictionaryPageHeader IndexPageHeader *IndexPageHeader The type of the page indicates which of the *Header fields below is set. Uncompressed page size in bytes (not including this header).
Size of the page, including header. Sum of compressed_page_size and header length. Index within the RowGroup of the first row of the page; this means pages change on record boundaries (r = 0). Offset of the page in the file.
( PageType) String() string PageType : expvar.Var PageType : fmt.Stringer func github.com/parquet-go/parquet-go.DataPageHeader.PageType() PageType func github.com/parquet-go/parquet-go.DataPageHeaderV1.PageType() PageType func github.com/parquet-go/parquet-go.DataPageHeaderV2.PageType() PageType func github.com/parquet-go/parquet-go.DictionaryPageHeader.PageType() PageType func github.com/parquet-go/parquet-go.PageHeader.PageType() PageType const DataPage const DataPageV2 const DictionaryPage const IndexPage
Metadata for each column chunk in this row group. This list must have the same order as the SchemaElement list in FileMetaData. Byte offset from beginning of file to first page (data or dictionary) in this row group Number of rows in this row group. Row group ordinal in the file. If set, specifies a sort ordering of the rows in this RowGroup. The sorting columns can be a subset of all the columns. Total byte size of all the uncompressed column data in this row group. Total byte size of all compressed (and potentially encrypted) column data in this row group.
Represents a element inside a schema definition. - if it is a group (inner node) then type is undefined and num_children is defined - if it is a primitive type (leaf) then type is defined and num_children is undefined The nodes are listed in depth first traversal order. DEPRECATED: When the schema is the result of a conversion from another model. Used to record the original type to help with cross conversion. This is superseded by logicalType. When the original schema supports field ids, this will save the original field id in the parquet schema. The logical type of this SchemaElement LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1. Name of the field in the schema. Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal. The children count is used to construct the nested relationship. This field is not set when the element is a primitive type Precision *int32 repetition of the field. The root of the schema does not have a repetition_type. All other nodes must have one. DEPRECATED: Used when this column contains decimal data. See the DECIMAL converted type for more details. This is superseded by using the DecimalType annotation in logicalType. Data type for this field. Not set if the current element is a non-leaf node. If type is FixedLenByteArray, this is the byte length of the values. Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3). Note that this is in the schema, and therefore fixed for the entire file.
Wrapper struct to specify sort order. The column index (in this row group) If true, indicates this column is sorted in descending order. If true, nulls will come before non-null values, otherwise, nulls go at the end.
Block-based algorithm type annotation.
Statistics per row group and per page. All fields are optional. Count of distinct values occurring. DEPRECATED: min and max value of the column. Use min_value and max_value. Values are encoded using PLAIN encoding, except that variable-length byte arrays do not include a length prefix. These fields encode min and max values determined by signed comparison only. New files should use the correct order for a column's logical type and store the values in the min_value and max_value fields. To support older readers, these may be set when the column order is signed. Min and max values for the column, determined by its ColumnOrder. Values are encoded using PLAIN encoding, except that variable-length byte arrays do not include a length prefix. Min []byte MinValue []byte Count of null value in the column.
Empty structs to use as logical type annotations. (*StringType) String() string *StringType : expvar.Var *StringType : fmt.Stringer
Timestamp logical type annotation Allowed for physical types: INT64 IsAdjustedToUTC bool Unit TimeUnit (*TimestampType) String() string *TimestampType : expvar.Var *TimestampType : fmt.Stringer
Time logical type annotation Allowed for physical types: INT32 (millis), INT64 (micros, nanos) IsAdjustedToUTC bool Unit TimeUnit (*TimeType) String() string *TimeType : expvar.Var *TimeType : fmt.Stringer
Micros *MicroSeconds Millis *MilliSeconds Nanos *NanoSeconds (*TimeUnit) String() string *TimeUnit : expvar.Var *TimeUnit : fmt.Stringer func github.com/parquet-go/parquet-go.TimeUnit.TimeUnit() TimeUnit
Types supported by Parquet. These types are intended to be used in combination with the encodings to control the on disk storage format. For example INT16 is not included as a type since a good encoding of INT32 would handle this. ( Type) String() string Type : expvar.Var Type : fmt.Stringer func github.com/parquet-go/parquet-go.Type.PhysicalType() *Type const Boolean const ByteArray const Double const FixedLenByteArray const Float const Int32 const Int64 const Int96
Empty struct to signal the order defined by the physical or logical type.
(*UUIDType) String() string *UUIDType : expvar.Var *UUIDType : fmt.Stringer
Hash strategy type annotation. xxHash is an extremely fast non-cryptographic hash algorithm. It uses 64 bits version of xxHash.
Package-Level Constants (total 35)
Bit packed encoding. This can only be used if the data has a known max width. Usable for definition/repetition levels encoding.
const Boolean Type = 0
const Brotli CompressionCodec = 4 // Added in 2.4
const ByteArray Type = 6
Encoding for floating-point data. K byte-streams are created where K is the size in bytes of the data type. The individual bytes of an FP value are scattered to the corresponding stream and the streams are concatenated. This itself does not reduce the size of the data but can lead to better compression afterwards.
const DataPage PageType = 0
Version 2 is indicated in the PageHeader and the use of DataPageHeaderV2, and allows you to read repetition and definition level data without decompressing the Page.
Delta encoding for integers. This can be used for int columns and works best on sorted data.
Incremental-encoded byte array. Prefix lengths are encoded using DELTA_BINARY_PACKED. Suffixes are stored as delta length byte arrays.
Encoding for byte arrays to separate the length values and the data. The lengths are encoded using DeltaBinaryPacked.
const Double Type = 5
const Float Type = 4
const IndexPage PageType = 1
const Int32 Type = 1
const Int64 Type = 2
const Int96 Type = 3 // deprecated, only used by legacy implementations.
const Lz4 CompressionCodec = 5 // DEPRECATED (Added in 2.4)
const Lz4Raw CompressionCodec = 7 // Added in 2.9
The field is optional (can be null) and each record has 0 or 1 values.
Default encoding. Boolean - 1 bit per value. 0 is false; 1 is true. Int32 - 4 bytes per value. Stored as little-endian. Int64 - 8 bytes per value. Stored as little-endian. Float - 4 bytes per value. IEEE. Stored as little-endian. Double - 8 bytes per value. IEEE. Stored as little-endian. ByteArray - 4 byte length stored as little endian, followed by bytes. FixedLenByteArray - Just the bytes.
Deprecated: Dictionary encoding. The values in the dictionary are encoded in the plain type. In a data page use RLEDictionary instead. In a Dictionary page use Plain instead.
The field is repeated and can contain 0 or more values.
The field is required (can not be null) and each record has exactly 1 value.
Group packed run length encoding. Usable for definition/repetition levels encoding and Booleans (on one bit: 0 is false 1 is true.)
Dictionary encoding: the ids are encoded using the RLE encoding
const Zstd CompressionCodec = 6 // Added in 2.4