parquets
Version:
TypeScript implementation of the Parquet file format, based on parquet.js
20 lines (19 loc) • 702 B
TypeScript
import { OriginalType, ParquetType, PrimitiveType } from './declare';
export interface ParquetTypeKit {
primitiveType: PrimitiveType;
originalType?: OriginalType;
typeLength?: number;
toPrimitive: Function;
fromPrimitive?: Function;
}
export declare const PARQUET_LOGICAL_TYPES: Record<ParquetType, ParquetTypeKit>;
/**
* Convert a value from it's native representation to the internal/underlying
* primitive type
*/
export declare function toPrimitive(type: ParquetType, value: any): any;
/**
* Convert a value from it's internal/underlying primitive representation to
* the native representation
*/
export declare function fromPrimitive(type: ParquetType, value: any): any;