Convert boolean column

This commit is contained in:
Kenny Daniel 2024-05-21 22:02:08 -07:00
parent 66b832d5bb
commit 6a75a960da
No known key found for this signature in database
GPG Key ID: 90AB653A8CAD7E45
2 changed files with 6 additions and 5 deletions

@ -53,6 +53,7 @@ export function readDataPageV2(compressedBytes, ph, schemaPath, columnMetadata,
// assert(columnMetadata.type === 'BOOLEAN')
dataPage = new Array(nValues)
readRleBitPackedHybrid(pageReader, 1, 0, dataPage)
dataPage = dataPage.map(x => !!x)
} else if (
daph2.encoding === 'PLAIN_DICTIONARY' ||
daph2.encoding === 'RLE_DICTIONARY'

@ -1,7 +1,7 @@
[
["abc", 1, 2, 1, [1, 2, 3]],
["abc", 2, 3, 1, null],
["abc", 3, 4, 1, null],
[null, 4, 5, 0, [1, 2, 3]],
["abc", 5, 2, 1, [1, 2]]
["abc", 1, 2, true, [1, 2, 3]],
["abc", 2, 3, true, null],
["abc", 3, 4, true, null],
[null, 4, 5, false, [1, 2, 3]],
["abc", 5, 2, true, [1, 2]]
]