import { CompressionType, Table } from "@uwdata/flechette"; import type { CompressionType_, ExtractionOptions } from "@uwdata/flechette"; import type { LogicalType } from "./logical-types"; import type { QuackDataChunk } from "./vector"; /** Flechette extraction options accepted by Quack Arrow helpers. */ export interface QuackArrowOptions extends ExtractionOptions { } /** Explicit DuckDB logical types for Arrow columns, by index or column name. */ export type QuackArrowDuckTypeSchema = readonly LogicalType[] | Record; /** Options for converting Quack chunks into a Flechette Arrow table. */ export interface QuackArrowTableOptions extends QuackArrowOptions { /** DuckDB logical types to use when chunks are empty or types should be overridden. */ duckTypes?: readonly LogicalType[]; } /** Options for encoding Quack results as Arrow IPC bytes. */ export interface QuackArrowIPCOptions extends QuackArrowTableOptions { /** Arrow IPC output format. Defaults to Flechette's stream format. */ format?: "stream" | "file"; /** Optional Flechette compression codec id. */ codec?: CompressionType_ | null; } /** Options for converting Arrow input into Quack append chunks. */ export interface QuackArrowAppendOptions extends QuackArrowOptions { /** DuckDB logical types to use instead of inferring from Arrow schema metadata. */ duckTypes?: QuackArrowDuckTypeSchema; } /** Arrow IPC input accepted by Flechette. */ export type QuackArrowIPCInput = ArrayBufferLike | Uint8Array | Uint8Array[]; /** Arrow input accepted by append helpers. */ export type QuackArrowInput = Table | QuackArrowIPCInput; /** Re-export Flechette's compression enum for callers using Arrow IPC compression. */ export { CompressionType }; /** Re-export Flechette's Arrow table class for public SDK type narrowing. */ export { Table as ArrowTable }; /** Convert one Quack DataChunk into a Flechette Arrow table. */ export declare function arrowTableFromDataChunk(chunk: QuackDataChunk, columnNames?: string[] | undefined, options?: QuackArrowTableOptions): Table; /** Convert Quack DataChunks into one Flechette Arrow table. */ export declare function arrowTableFromChunks(chunks: readonly QuackDataChunk[], columnNames?: readonly string[], options?: QuackArrowTableOptions): Table; /** Convert Quack DataChunks into Arrow IPC bytes. */ export declare function arrowIPCFromChunks(chunks: readonly QuackDataChunk[], columnNames?: readonly string[], options?: QuackArrowIPCOptions): Uint8Array; /** Encode a Flechette Arrow table as Arrow IPC bytes. */ export declare function arrowIPCFromTable(table: Table, options?: QuackArrowIPCOptions): Uint8Array; /** Convert Arrow IPC bytes into Quack append chunks. */ export declare function dataChunksFromArrowIPC(input: QuackArrowIPCInput, options?: QuackArrowAppendOptions): QuackDataChunk[]; /** Convert a Flechette Arrow table into Quack append chunks. */ export declare function dataChunksFromArrowTable(table: Table, options?: QuackArrowAppendOptions): QuackDataChunk[]; /** Convert either a Flechette table or Arrow IPC bytes into Quack append chunks. */ export declare function dataChunksFromArrow(input: QuackArrowInput, options?: QuackArrowAppendOptions): QuackDataChunk[];