mirror of
https://github.com/asadbek064/hyparquet.git
synced 2025-12-24 14:26:38 +00:00
Move imports to non-exported functions (yields smaller types)
This commit is contained in:
parent
b7db4653e7
commit
1d65bc68bb
10
package.json
10
package.json
@ -47,13 +47,13 @@
|
||||
"test": "vitest run"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "22.14.1",
|
||||
"@vitest/coverage-v8": "3.1.1",
|
||||
"@types/node": "22.15.2",
|
||||
"@vitest/coverage-v8": "3.1.2",
|
||||
"eslint": "9.24.0",
|
||||
"eslint-plugin-jsdoc": "50.6.9",
|
||||
"eslint-plugin-jsdoc": "50.6.11",
|
||||
"hyparquet-compressors": "1.1.1",
|
||||
"typescript": "5.8.3",
|
||||
"typescript-eslint": "8.30.1",
|
||||
"vitest": "3.1.1"
|
||||
"typescript-eslint": "8.31.0",
|
||||
"vitest": "3.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import { getMaxDefinitionLevel, isListLike, isMapLike } from './schema.js'
|
||||
* Reconstructs a complex nested structure from flat arrays of values and
|
||||
* definition and repetition levels, according to Dremel encoding.
|
||||
*
|
||||
* @import {DecodedArray} from '../src/types.d.ts'
|
||||
* @param {any[]} output
|
||||
* @param {number[] | undefined} definitionLevels
|
||||
* @param {number[]} repetitionLevels
|
||||
@ -102,7 +101,6 @@ export function assembleLists(output, definitionLevels, repetitionLevels, values
|
||||
* Assemble a nested structure from subcolumn data.
|
||||
* https://github.com/apache/parquet-format/blob/apache-parquet-format-2.10.0/LogicalTypes.md#nested-types
|
||||
*
|
||||
* @import {SchemaTree} from '../src/types.d.ts'
|
||||
* @param {Map<string, DecodedArray>} subcolumnData
|
||||
* @param {SchemaTree} schema top-level schema element
|
||||
* @param {number} [depth] depth of nested structure
|
||||
@ -179,6 +177,7 @@ export function assembleNested(subcolumnData, schema, depth = 0) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @import {DecodedArray, SchemaTree} from '../src/types.d.ts'
|
||||
* @param {DecodedArray} arr
|
||||
* @param {number} depth
|
||||
*/
|
||||
|
||||
@ -3,7 +3,6 @@ const dayMillis = 86400000 // 1 day in milliseconds
|
||||
/**
|
||||
* Convert known types from primitive to rich, and dereference dictionary.
|
||||
*
|
||||
* @import {DecodedArray, Encoding, SchemaElement} from '../src/types.d.ts'
|
||||
* @param {DecodedArray} data series of primitive types
|
||||
* @param {DecodedArray | undefined} dictionary
|
||||
* @param {SchemaElement} schemaElement
|
||||
@ -145,6 +144,7 @@ export function parseDecimal(bytes) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @import {DecodedArray, Encoding, SchemaElement} from '../src/types.d.ts'
|
||||
* @param {bigint} value
|
||||
* @returns {Date}
|
||||
*/
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
/**
|
||||
* Read `count` values of the given type from the reader.view.
|
||||
*
|
||||
* @import {DataReader, DecodedArray, ParquetType} from '../src/types.d.ts'
|
||||
* @param {DataReader} reader - buffer to read data from
|
||||
* @param {ParquetType} type - parquet type of the data
|
||||
* @param {number} count - number of values to read
|
||||
@ -168,6 +167,7 @@ function readPlainByteArrayFixed(reader, count, fixedLength) {
|
||||
/**
|
||||
* Create a new buffer with the offset and size.
|
||||
*
|
||||
* @import {DataReader, DecodedArray, ParquetType} from '../src/types.d.ts'
|
||||
* @param {ArrayBufferLike} buffer
|
||||
* @param {number} offset
|
||||
* @param {number} size
|
||||
|
||||
@ -8,7 +8,6 @@ import { equals } from './utils.js'
|
||||
* Accepts optional filter object to filter the results and orderBy column name to sort the results.
|
||||
* Note that using orderBy may SIGNIFICANTLY increase the query time.
|
||||
*
|
||||
* @import {ParquetQueryFilter} from '../src/types.d.ts'
|
||||
* @param {ParquetReadOptions & { filter?: ParquetQueryFilter, orderBy?: string }} options
|
||||
* @returns {Promise<Record<string, any>[]>} resolves when all requested rows and columns are parsed
|
||||
*/
|
||||
@ -48,7 +47,7 @@ export async function parquetQuery(options) {
|
||||
/**
|
||||
* Reads a list rows from a parquet file, reading only the row groups that contain the rows.
|
||||
* Returns a sparse array of rows.
|
||||
* @import {ParquetReadOptions} from '../src/types.d.ts'
|
||||
* @import {ParquetQueryFilter, ParquetReadOptions} from '../src/types.d.ts'
|
||||
* @param {ParquetReadOptions & { rows: number[] }} options
|
||||
* @returns {Promise<Record<string, any>[]>}
|
||||
*/
|
||||
|
||||
@ -19,7 +19,6 @@ export const CompactType = {
|
||||
/**
|
||||
* Parse TCompactProtocol
|
||||
*
|
||||
* @import {DataReader, ThriftObject, ThriftType} from '../src/types.d.ts'
|
||||
* @param {DataReader} reader
|
||||
* @returns {{ [key: `field_${number}`]: any }}
|
||||
*/
|
||||
@ -47,6 +46,7 @@ export function deserializeTCompactProtocol(reader) {
|
||||
/**
|
||||
* Read a single element based on its type
|
||||
*
|
||||
* @import {DataReader, ThriftObject, ThriftType} from '../src/types.d.ts'
|
||||
* @param {DataReader} reader
|
||||
* @param {number} type
|
||||
* @returns {ThriftType}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user