Add bigint to ParquetQueryValue types

This commit is contained in:
Kenny Daniel 2025-11-25 22:27:55 -08:00
parent 0c41b7d334
commit 7ba6440a54
No known key found for this signature in database
GPG Key ID: 90AB653A8CAD7E45
4 changed files with 6 additions and 6 deletions

@ -56,11 +56,11 @@
},
"devDependencies": {
"@types/node": "24.10.1",
"@vitest/coverage-v8": "4.0.12",
"@vitest/coverage-v8": "4.0.14",
"eslint": "9.39.1",
"eslint-plugin-jsdoc": "61.4.0",
"eslint-plugin-jsdoc": "61.4.1",
"hyparquet-compressors": "1.1.1",
"typescript": "5.9.3",
"vitest": "4.0.12"
"vitest": "4.0.14"
}
}

@ -123,7 +123,7 @@ export async function parquetQuery(options) {
*/
async function parquetReadRows(options) {
const { file, rows } = options
options.metadata ||= await parquetMetadataAsync(file, options)
options.metadata ??= await parquetMetadataAsync(file, options)
const { row_groups: rowGroups } = options.metadata
// Compute row groups to fetch
const groupIncluded = Array(rowGroups.length).fill(false)

2
src/types.d.ts vendored

@ -57,7 +57,7 @@ export type ParquetQueryFilter =
| { $or: ParquetQueryFilter[] }
| { $nor: ParquetQueryFilter[] }
type ParquetQueryColumnsFilter = { [key: string]: ParquetQueryOperator }
export type ParquetQueryValue = string | number | boolean | object | null | undefined
export type ParquetQueryValue = string | number | bigint | boolean | object | null | undefined
export type ParquetQueryOperator = {
$gt?: ParquetQueryValue
$gte?: ParquetQueryValue

@ -146,7 +146,7 @@ export async function asyncBufferFromUrl({ url, byteLength, requestInit, fetch:
if (!url) throw new Error('missing url')
const fetch = customFetch ?? globalThis.fetch
// byte length from HEAD request
byteLength ||= await byteLengthFromUrl(url, requestInit, fetch)
byteLength ??= await byteLengthFromUrl(url, requestInit, fetch)
/**
* A promise for the whole buffer, if range requests are not supported.