/** * Mapping our column types onto Parquet's two-layer type system: a PHYSICAL type * that carries the bytes, plus an optional LOGICAL annotation that says how to * read them. This is why extra types are cheap โ€” `date` is just an INT32 wearing * a label. * * We write both the modern `logicalType` and the legacy `converted_type`, since * readers in the wild still consult either one. * Spec: docs/specs/2026-07-19-typed-output-and-parquet-writer.md ยง2. */ import type { ColumnType } from '../column-type.js'; /** parquet.thrift `Type` */ export declare const PhysicalType: { readonly BOOLEAN: 0; readonly INT32: 1; readonly INT64: 2; readonly INT96: 3; readonly FLOAT: 4; readonly DOUBLE: 5; readonly BYTE_ARRAY: 6; readonly FIXED_LEN_BYTE_ARRAY: 7; }; export type PhysicalType = (typeof PhysicalType)[keyof typeof PhysicalType]; /** parquet.thrift `FieldRepetitionType` */ export declare const Repetition: { readonly REQUIRED: 0; readonly OPTIONAL: 1; readonly REPEATED: 2; }; /** parquet.thrift `Encoding` */ export declare const Encoding: { readonly PLAIN: 0; readonly RLE: 3; /** Dictionary INDICES on a data page. The dictionary page itself is PLAIN. */ readonly RLE_DICTIONARY: 8; }; /** parquet.thrift `CompressionCodec` */ export declare const Codec: { readonly UNCOMPRESSED: 0; readonly SNAPPY: 1; }; /** parquet.thrift `PageType` */ export declare const PageType: { readonly DATA_PAGE: 0; readonly DICTIONARY_PAGE: 2; }; /** parquet.thrift `ConvertedType` (legacy annotation) */ export declare const ConvertedType: { readonly UTF8: 0; readonly MAP: 1; readonly LIST: 3; readonly ENUM: 4; readonly UINT_8: 11; readonly UINT_16: 12; readonly UINT_32: 13; readonly UINT_64: 14; readonly DECIMAL: 5; readonly DATE: 6; readonly TIMESTAMP_MILLIS: 9; readonly JSON: 19; }; /** Field id of the logical-type variant inside parquet.thrift `LogicalType`. */ export declare const LogicalTypeField: { readonly STRING: 1; /** NOTE: 2 in the LogicalType union, where ConvertedType.MAP is 1 โ€” the two * enums are unrelated and a value copied from one to the other annotates * something else entirely. */ readonly MAP: 2; /** NOTE: 3 in the LogicalType union; ConvertedType.LIST is also 3, but the * two enums are unrelated โ€” 4 here would be ENUM. */ readonly LIST: 3; readonly DECIMAL: 5; readonly DATE: 6; readonly TIMESTAMP: 8; readonly JSON: 12; readonly UUID: 14; readonly FLOAT16: 15; readonly ENUM: 4; readonly INTEGER: 10; }; export interface ParquetTypeMapping { readonly physical: PhysicalType; /** Only for FIXED_LEN_BYTE_ARRAY. */ readonly typeLength?: number; readonly convertedType?: number; /** Which variant of the LogicalType union to emit, if any. */ readonly logicalField?: number; readonly precision?: number; readonly scale?: number; /** INTEGER only: declared width. */ readonly bitWidth?: number; /** INTEGER only: false for the unsigned kinds. */ readonly isSigned?: boolean; } /** Physical + annotation for a declared column type. */ export declare function mapColumnType(type: ColumnType): ParquetTypeMapping; //# sourceMappingURL=schema.d.ts.map