import type { FieldKey } from './fieldKey'; import type { CompiledExpression } from './query/compiler'; import type { WindowFunctionType } from './query/dataQuery'; export interface WindowFunctionOptions { orderBy?: Array<{ field: string; direction: string; }>; partitionBy?: string[]; topN?: number; bottomN?: number; } export interface EngineFieldComputedExpression { type: 'computed'; columns: FieldKey[]; compiledExpression: CompiledExpression; } export interface EngineFieldWindowExpression { type: 'window'; functionType: WindowFunctionType; field: FieldKey; options: TNodeOptions; } export type EngineFieldExpression = EngineFieldComputedExpression | EngineFieldWindowExpression;