hyparquet/src/constants.js
Kenny a2024a781c
Parse column and offset indexes (#29)
* Parse indicies

* Add parsed offset indices

* Add parsed column indices

* Test readColumnIndex and readOffsetIndex

* Add more parsed offset indices

* Remove unnecessary toJson when loading expected results

* Add length checks to convertMetadata

* Rename indicies.js to indexes.js

* Rename indices.test.js to indexes.test.js

* Rename *_indices.json to *_indexes.json

* Use asyncBufferFromFile in indexes.test.js

---------

Co-authored-by: Brian Park <park-brian@users.noreply.github.com>
2024-08-18 18:23:54 -07:00

102 lines
1.5 KiB
JavaScript

/** @type {import('./types.js').ParquetType[]} */
export const ParquetType = [
'BOOLEAN',
'INT32',
'INT64',
'INT96', // deprecated
'FLOAT',
'DOUBLE',
'BYTE_ARRAY',
'FIXED_LEN_BYTE_ARRAY',
]
export const Encoding = [
'PLAIN',
undefined,
'PLAIN_DICTIONARY',
'RLE',
'BIT_PACKED', // deprecated
'DELTA_BINARY_PACKED',
'DELTA_LENGTH_BYTE_ARRAY',
'DELTA_BYTE_ARRAY',
'RLE_DICTIONARY',
'BYTE_STREAM_SPLIT',
]
export const FieldRepetitionType = [
'REQUIRED',
'OPTIONAL',
'REPEATED',
]
/** @type {import('./types.js').ConvertedType[]} */
export const ConvertedType = [
'UTF8',
'MAP',
'MAP_KEY_VALUE',
'LIST',
'ENUM',
'DECIMAL',
'DATE',
'TIME_MILLIS',
'TIME_MICROS',
'TIMESTAMP_MILLIS',
'TIMESTAMP_MICROS',
'UINT_8',
'UINT_16',
'UINT_32',
'UINT_64',
'INT_8',
'INT_16',
'INT_32',
'INT_64',
'JSON',
'BSON',
'INTERVAL',
]
/** @type {import('./types.js').LogicalTypeType[]} */
export const logicalTypeType = [
'NULL',
'STRING',
'MAP',
'LIST',
'ENUM',
'DECIMAL',
'DATE',
'TIME',
'TIMESTAMP',
'INTERVAL',
'INTEGER',
'NULL',
'JSON',
'BSON',
'UUID',
]
export const CompressionCodec = [
'UNCOMPRESSED',
'SNAPPY',
'GZIP',
'LZO',
'BROTLI',
'LZ4',
'ZSTD',
'LZ4_RAW',
]
/** @type {import('./types.js').PageType[]} */
export const PageType = [
'DATA_PAGE',
'INDEX_PAGE',
'DICTIONARY_PAGE',
'DATA_PAGE_V2',
]
/** @type {import('./types.js').BoundaryOrder[]} */
export const BoundaryOrder = [
'UNORDERED',
'ASCENDING',
'DESCENDING',
]