From 7d1d877c9f599a475c92d8487be1901e974d72e3 Mon Sep 17 00:00:00 2001 From: Kenny Daniel Date: Thu, 23 May 2024 00:11:58 -0700 Subject: [PATCH] Fix metadata parsing of page_type --- src/metadata.js | 4 +- test/files/brotli_compressed.metadata.json | 12 +- .../byte_stream_split.zstd.metadata.json | 4 +- ...e_stream_split_extended.gzip.metadata.json | 28 ++-- test/files/delta_binary_packed.metadata.json | 132 +++++++++--------- test/files/delta_byte_array.metadata.json | 18 +-- ...lta_encoding_optional_column.metadata.json | 34 ++--- ...lta_encoding_required_column.metadata.json | 34 ++--- .../delta_length_byte_array.metadata.json | 2 +- .../files/dict-page-offset-zero.metadata.json | 2 +- test/files/fixed_length_decimal.metadata.json | 2 +- .../float16_nonzeros_and_nans.metadata.json | 4 +- .../files/hadoop_lz4_compressed.metadata.json | 12 +- test/files/incorrect_map_schema.metadata.json | 4 +- test/files/lz4_raw_compressed.metadata.json | 6 +- ...n-dict-uncompressed-checksum.metadata.json | 8 +- test/files/rowgroups.metadata.json | 8 +- 17 files changed, 157 insertions(+), 157 deletions(-) diff --git a/src/metadata.js b/src/metadata.js index dbddae4..017fd59 100644 --- a/src/metadata.js +++ b/src/metadata.js @@ -1,4 +1,4 @@ -import { CompressionCodec, ConvertedType, Encoding, FieldRepetitionType, ParquetType } from './constants.js' +import { CompressionCodec, ConvertedType, Encoding, FieldRepetitionType, PageType, ParquetType } from './constants.js' import { parseFloat16 } from './convert.js' import { getSchemaPath } from './schema.js' import { deserializeTCompactProtocol } from './thrift.js' @@ -139,7 +139,7 @@ export function parquetMetadata(arrayBuffer) { dictionary_page_offset: column.field_3.field_11, statistics: columnStats(column.field_3.field_12, columnSchema[columnIndex]), encoding_stats: column.field_3.field_13?.map((/** @type {any} */ encodingStat) => ({ - page_type: encodingStat.field_1, + page_type: PageType[encodingStat.field_1], encoding: Encoding[encodingStat.field_2], count: encodingStat.field_3, })), diff --git a/test/files/brotli_compressed.metadata.json b/test/files/brotli_compressed.metadata.json index 41cf7d5..904151c 100644 --- a/test/files/brotli_compressed.metadata.json +++ b/test/files/brotli_compressed.metadata.json @@ -53,12 +53,12 @@ }, "encoding_stats": [ { - "page_type": 2, + "page_type": "DICTIONARY_PAGE", "encoding": "PLAIN", "count": 1 }, { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "RLE_DICTIONARY", "count": 1 } @@ -90,12 +90,12 @@ }, "encoding_stats": [ { - "page_type": 2, + "page_type": "DICTIONARY_PAGE", "encoding": "PLAIN", "count": 1 }, { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "RLE_DICTIONARY", "count": 1 } @@ -129,12 +129,12 @@ }, "encoding_stats": [ { - "page_type": 2, + "page_type": "DICTIONARY_PAGE", "encoding": "PLAIN", "count": 1 }, { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "RLE_DICTIONARY", "count": 1 } diff --git a/test/files/byte_stream_split.zstd.metadata.json b/test/files/byte_stream_split.zstd.metadata.json index 48df755..d72450a 100644 --- a/test/files/byte_stream_split.zstd.metadata.json +++ b/test/files/byte_stream_split.zstd.metadata.json @@ -46,7 +46,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } @@ -78,7 +78,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } diff --git a/test/files/byte_stream_split_extended.gzip.metadata.json b/test/files/byte_stream_split_extended.gzip.metadata.json index bae719f..0660f2d 100644 --- a/test/files/byte_stream_split_extended.gzip.metadata.json +++ b/test/files/byte_stream_split_extended.gzip.metadata.json @@ -134,7 +134,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } @@ -166,7 +166,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } @@ -198,7 +198,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } @@ -230,7 +230,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } @@ -262,7 +262,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } @@ -294,7 +294,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } @@ -326,7 +326,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } @@ -358,7 +358,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } @@ -390,7 +390,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } @@ -422,7 +422,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } @@ -464,7 +464,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } @@ -506,7 +506,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } @@ -558,7 +558,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } @@ -610,7 +610,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "BYTE_STREAM_SPLIT", "count": 1 } diff --git a/test/files/delta_binary_packed.metadata.json b/test/files/delta_binary_packed.metadata.json index 37fc618..c890d06 100644 --- a/test/files/delta_binary_packed.metadata.json +++ b/test/files/delta_binary_packed.metadata.json @@ -14,7 +14,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -45,7 +45,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -76,7 +76,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -107,7 +107,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -138,7 +138,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -169,7 +169,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -200,7 +200,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -231,7 +231,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -262,7 +262,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -293,7 +293,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -324,7 +324,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -355,7 +355,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -386,7 +386,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -417,7 +417,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -448,7 +448,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -479,7 +479,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -510,7 +510,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -541,7 +541,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -572,7 +572,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -603,7 +603,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -634,7 +634,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -665,7 +665,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -696,7 +696,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -727,7 +727,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -758,7 +758,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -789,7 +789,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -820,7 +820,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -851,7 +851,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -882,7 +882,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -913,7 +913,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -944,7 +944,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -975,7 +975,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1006,7 +1006,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1037,7 +1037,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1068,7 +1068,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1099,7 +1099,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1130,7 +1130,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1161,7 +1161,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1192,7 +1192,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1223,7 +1223,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1254,7 +1254,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1285,7 +1285,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1316,7 +1316,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1347,7 +1347,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1378,7 +1378,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1409,7 +1409,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1440,7 +1440,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1471,7 +1471,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1502,7 +1502,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1533,7 +1533,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1564,7 +1564,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1595,7 +1595,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1626,7 +1626,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1657,7 +1657,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1688,7 +1688,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1719,7 +1719,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1750,7 +1750,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1781,7 +1781,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1812,7 +1812,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1843,7 +1843,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1874,7 +1874,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1905,7 +1905,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1936,7 +1936,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1967,7 +1967,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -1998,7 +1998,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ @@ -2029,7 +2029,7 @@ { "count": 1, "encoding": "DELTA_BINARY_PACKED", - "page_type": 3 + "page_type": "DATA_PAGE_V2" } ], "encodings": [ diff --git a/test/files/delta_byte_array.metadata.json b/test/files/delta_byte_array.metadata.json index ac19a77..e31d515 100644 --- a/test/files/delta_byte_array.metadata.json +++ b/test/files/delta_byte_array.metadata.json @@ -86,7 +86,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -115,7 +115,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -144,7 +144,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -173,7 +173,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -202,7 +202,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -231,7 +231,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -258,7 +258,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -287,7 +287,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -316,7 +316,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } diff --git a/test/files/delta_encoding_optional_column.metadata.json b/test/files/delta_encoding_optional_column.metadata.json index 79667dc..5d62452 100644 --- a/test/files/delta_encoding_optional_column.metadata.json +++ b/test/files/delta_encoding_optional_column.metadata.json @@ -127,7 +127,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -158,7 +158,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -189,7 +189,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -220,7 +220,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -251,7 +251,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -282,7 +282,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -313,7 +313,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -344,7 +344,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -375,7 +375,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -404,7 +404,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -433,7 +433,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -462,7 +462,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -491,7 +491,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -520,7 +520,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -549,7 +549,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -578,7 +578,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -607,7 +607,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } diff --git a/test/files/delta_encoding_required_column.metadata.json b/test/files/delta_encoding_required_column.metadata.json index 64ddea3..2cb7f60 100644 --- a/test/files/delta_encoding_required_column.metadata.json +++ b/test/files/delta_encoding_required_column.metadata.json @@ -151,7 +151,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -187,7 +187,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -223,7 +223,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -259,7 +259,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -295,7 +295,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -331,7 +331,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -367,7 +367,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -403,7 +403,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -439,7 +439,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BINARY_PACKED", "count": 1 } @@ -473,7 +473,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -507,7 +507,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -541,7 +541,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -575,7 +575,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -609,7 +609,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -643,7 +643,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -677,7 +677,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } @@ -711,7 +711,7 @@ }, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_BYTE_ARRAY", "count": 1 } diff --git a/test/files/delta_length_byte_array.metadata.json b/test/files/delta_length_byte_array.metadata.json index 882d25f..8789aa2 100644 --- a/test/files/delta_length_byte_array.metadata.json +++ b/test/files/delta_length_byte_array.metadata.json @@ -40,7 +40,7 @@ "data_page_offset": 4, "encoding_stats": [ { - "page_type": 3, + "page_type": "DATA_PAGE_V2", "encoding": "DELTA_LENGTH_BYTE_ARRAY", "count": 1 } diff --git a/test/files/dict-page-offset-zero.metadata.json b/test/files/dict-page-offset-zero.metadata.json index f3e642f..1ca39d7 100644 --- a/test/files/dict-page-offset-zero.metadata.json +++ b/test/files/dict-page-offset-zero.metadata.json @@ -42,7 +42,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } diff --git a/test/files/fixed_length_decimal.metadata.json b/test/files/fixed_length_decimal.metadata.json index eb1b00e..1c37cbd 100644 --- a/test/files/fixed_length_decimal.metadata.json +++ b/test/files/fixed_length_decimal.metadata.json @@ -67,7 +67,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } diff --git a/test/files/float16_nonzeros_and_nans.metadata.json b/test/files/float16_nonzeros_and_nans.metadata.json index 82b6fd9..ca0e28e 100644 --- a/test/files/float16_nonzeros_and_nans.metadata.json +++ b/test/files/float16_nonzeros_and_nans.metadata.json @@ -47,12 +47,12 @@ }, "encoding_stats": [ { - "page_type": 2, + "page_type": "DICTIONARY_PAGE", "encoding": "PLAIN", "count": 1 }, { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "RLE_DICTIONARY", "count": 1 } diff --git a/test/files/hadoop_lz4_compressed.metadata.json b/test/files/hadoop_lz4_compressed.metadata.json index 15703ec..91c5872 100644 --- a/test/files/hadoop_lz4_compressed.metadata.json +++ b/test/files/hadoop_lz4_compressed.metadata.json @@ -14,12 +14,12 @@ { "count": 1, "encoding": "PLAIN_DICTIONARY", - "page_type": 2 + "page_type": "DICTIONARY_PAGE" }, { "count": 1, "encoding": "PLAIN_DICTIONARY", - "page_type": 0 + "page_type": "DATA_PAGE" } ], "encodings": [ @@ -51,12 +51,12 @@ { "count": 1, "encoding": "PLAIN_DICTIONARY", - "page_type": 2 + "page_type": "DICTIONARY_PAGE" }, { "count": 1, "encoding": "PLAIN_DICTIONARY", - "page_type": 0 + "page_type": "DATA_PAGE" } ], "encodings": [ @@ -86,12 +86,12 @@ { "count": 1, "encoding": "PLAIN_DICTIONARY", - "page_type": 2 + "page_type": "DICTIONARY_PAGE" }, { "count": 1, "encoding": "PLAIN_DICTIONARY", - "page_type": 0 + "page_type": "DATA_PAGE" } ], "encodings": [ diff --git a/test/files/incorrect_map_schema.metadata.json b/test/files/incorrect_map_schema.metadata.json index 7a24212..e568a98 100644 --- a/test/files/incorrect_map_schema.metadata.json +++ b/test/files/incorrect_map_schema.metadata.json @@ -68,7 +68,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } @@ -105,7 +105,7 @@ }, "encoding_stats": [ { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN", "count": 1 } diff --git a/test/files/lz4_raw_compressed.metadata.json b/test/files/lz4_raw_compressed.metadata.json index fe556dc..2c46afc 100644 --- a/test/files/lz4_raw_compressed.metadata.json +++ b/test/files/lz4_raw_compressed.metadata.json @@ -14,7 +14,7 @@ { "count": 1, "encoding": "PLAIN", - "page_type": 0 + "page_type": "DATA_PAGE" } ], "encodings": [ @@ -46,7 +46,7 @@ { "count": 1, "encoding": "PLAIN", - "page_type": 0 + "page_type": "DATA_PAGE" } ], "encodings": [ @@ -76,7 +76,7 @@ { "count": 1, "encoding": "PLAIN", - "page_type": 0 + "page_type": "DATA_PAGE" } ], "encodings": [ diff --git a/test/files/plain-dict-uncompressed-checksum.metadata.json b/test/files/plain-dict-uncompressed-checksum.metadata.json index a2417cf..e05a708 100644 --- a/test/files/plain-dict-uncompressed-checksum.metadata.json +++ b/test/files/plain-dict-uncompressed-checksum.metadata.json @@ -46,12 +46,12 @@ }, "encoding_stats": [ { - "page_type": 2, + "page_type": "DICTIONARY_PAGE", "encoding": "PLAIN_DICTIONARY", "count": 1 }, { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN_DICTIONARY", "count": 1 } @@ -89,12 +89,12 @@ }, "encoding_stats": [ { - "page_type": 2, + "page_type": "DICTIONARY_PAGE", "encoding": "PLAIN_DICTIONARY", "count": 1 }, { - "page_type": 0, + "page_type": "DATA_PAGE", "encoding": "PLAIN_DICTIONARY", "count": 1 } diff --git a/test/files/rowgroups.metadata.json b/test/files/rowgroups.metadata.json index b9e6c78..7505d4b 100644 --- a/test/files/rowgroups.metadata.json +++ b/test/files/rowgroups.metadata.json @@ -25,8 +25,8 @@ "data_page_offset": 71, "dictionary_page_offset": 4, "encoding_stats": [ - { "count": 1, "encoding": "PLAIN", "page_type": 2 }, - { "count": 1, "encoding": "RLE_DICTIONARY", "page_type": 0 } + { "count": 1, "encoding": "PLAIN", "page_type": "DICTIONARY_PAGE" }, + { "count": 1, "encoding": "RLE_DICTIONARY", "page_type": "DATA_PAGE" } ], "encodings": ["PLAIN", "RLE", "RLE_DICTIONARY"], "num_values": 10, @@ -59,8 +59,8 @@ "data_page_offset": 294, "dictionary_page_offset": 248, "encoding_stats": [ - { "count": 1, "encoding": "PLAIN", "page_type": 2 }, - { "count": 1, "encoding": "RLE_DICTIONARY", "page_type": 0 } + { "count": 1, "encoding": "PLAIN", "page_type": "DICTIONARY_PAGE" }, + { "count": 1, "encoding": "RLE_DICTIONARY", "page_type": "DATA_PAGE" } ], "encodings": ["PLAIN", "RLE", "RLE_DICTIONARY"], "num_values": 5,