/** * Metadata key written onto rewritten fields to preserve the original * `Duration` time unit. Consumed by * `lib/result/ArrowResultConverter.ts` Phase 1 to choose the correct * scale when formatting INTERVAL DAY-TIME values. */ export declare const DURATION_UNIT_METADATA_KEY = "databricks.arrow.duration_unit"; /** * Walk an IPC stream payload and rewrite any `Duration` field in the * schema message to `Int64` (preserving the original time unit in * custom metadata). Subsequent record-batch messages are forwarded * verbatim — the data layout matches the rewritten `Int64` type * bit-for-bit. * * If the schema contains no `Duration` fields, the input buffer is * returned unchanged (zero-copy fast path). * * The caller is expected to pass a complete IPC stream payload (the * full byte buffer the kernel returned for one `fetchNextBatch` call, * or the schema-only payload from `statement.schema()`). Multi-segment * stream payloads are supported; we walk through each message until * the buffer is exhausted. * * @param ipcBytes raw IPC stream bytes from the napi binding * @returns either the original buffer (no rewrite needed) or a fresh * buffer with the schema message replaced */ export declare function rewriteDurationToInt64(ipcBytes: Buffer | Uint8Array): Buffer;