import { ParquetSchema } from './schema'; import { Page, PageData } from './declare'; /** * 'Shred' a record into a list of * tuples per column using the Google Dremel Algorithm.. * * The buffer argument must point to an object into which the shredded record * will be returned. You may re-use the buffer for repeated calls to this function * to append to an existing buffer, as long as the schema is unchanged. * * The format in which the shredded records will be stored in the buffer is as * follows: * * buffer = { * columnData: [ * 'my_col': { * dlevels: [d1, d2, .. dN], * rlevels: [r1, r2, .. rN], * values: [v1, v2, .. vN], * }, ... * ], * rowCount: X, * } * */ export interface RecordBuffer { columnData?: Record; rowCount?: number; pageRowCount?: number; pages?: Record; } export declare const shredRecord: (schema: ParquetSchema, record: Record, buffer: RecordBuffer) => void; /** * 'Materialize' a list of * tuples back to nested records (objects/arrays) using the Google Dremel * Algorithm.. * * The buffer argument must point to an object with the following structure (i.e. * the same structure that is returned by shredRecords): * * buffer = { * columnData: [ * 'my_col': { * dlevels: [d1, d2, .. dN], * rlevels: [r1, r2, .. rN], * values: [v1, v2, .. vN], * }, ... * ], * rowCount: X, * } * */ export declare const materializeRecords: (schema: ParquetSchema, buffer: RecordBuffer, records?: Array>) => Record[];