mirror of
https://github.com/asadbek064/hyparquet.git
synced 2025-12-05 22:41:55 +00:00
Omit onComplete from parquetReadObjects
This commit is contained in:
parent
1ca8b47014
commit
5d8f17903e
@ -48,13 +48,13 @@
|
||||
"test": "vitest run"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "22.15.19",
|
||||
"@vitest/coverage-v8": "3.1.3",
|
||||
"@types/node": "22.15.21",
|
||||
"@vitest/coverage-v8": "3.1.4",
|
||||
"eslint": "9.27.0",
|
||||
"eslint-plugin-jsdoc": "50.6.17",
|
||||
"hyparquet-compressors": "1.1.1",
|
||||
"typescript": "5.8.3",
|
||||
"typescript-eslint": "8.32.1",
|
||||
"vitest": "3.1.3"
|
||||
"vitest": "3.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
export { parquetMetadata, parquetMetadataAsync, parquetSchema } from './metadata.js'
|
||||
|
||||
import { parquetRead } from './read.js'
|
||||
|
||||
export { parquetMetadata, parquetMetadataAsync, parquetSchema } from './metadata.js'
|
||||
export { parquetRead }
|
||||
|
||||
export { parquetQuery } from './query.js'
|
||||
|
||||
export { snappyUncompress } from './snappy.js'
|
||||
|
||||
export { asyncBufferFromFile, asyncBufferFromUrl, byteLengthFromUrl, cachedAsyncBuffer, toJson } from './utils.js'
|
||||
|
||||
/**
|
||||
* @param {ParquetReadOptions} options
|
||||
* This is a helper function to read parquet row data as a promise.
|
||||
* It is a wrapper around the more configurable parquetRead function.
|
||||
*
|
||||
* @param {Omit<ParquetReadOptions, 'onComplete'>} options
|
||||
* @returns {Promise<Record<string, any>[]>} resolves when all requested rows and columns are parsed
|
||||
*/
|
||||
export function parquetReadObjects(options) {
|
||||
@ -22,6 +22,7 @@ export function parquetReadObjects(options) {
|
||||
}).catch(reject)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Explicitly export types for use in downstream typescript projects through
|
||||
* `import { ParquetReadOptions } from 'hyparquet'` for example.
|
||||
@ -29,7 +30,6 @@ export function parquetReadObjects(options) {
|
||||
* @template {any} T
|
||||
* @typedef {import('../src/types.d.ts').Awaitable<T>} Awaitable<T>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {import('../src/types.d.ts').AsyncBuffer} AsyncBuffer
|
||||
* @typedef {import('../src/types.d.ts').DataReader} DataReader
|
||||
|
||||
2
src/types.d.ts
vendored
2
src/types.d.ts
vendored
@ -5,7 +5,7 @@ export interface ParquetReadOptions {
|
||||
file: AsyncBuffer // file-like object containing parquet data
|
||||
metadata?: FileMetaData // parquet metadata, will be parsed if not provided
|
||||
columns?: string[] // columns to read, all columns if undefined
|
||||
rowFormat?: string // format of each row passed to the onComplete function
|
||||
rowFormat?: 'object' | 'array' // format of each row passed to the onComplete function
|
||||
rowStart?: number // first requested row index (inclusive)
|
||||
rowEnd?: number // last requested row index (exclusive)
|
||||
onChunk?: (chunk: ColumnData) => void // called when a column chunk is parsed. chunks may contain data outside the requested range.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user