public class QueryPlan<T, R> implements QueryPlanBase:
Immutable provider-neutral executable subset of the internal KQL QIR.
Providers receive this typed descriptor; they never receive KQL or SQL source text. The compiler creates instances directly from query: blocks.
plan = QueryPlan<Int, Int>( lambda(value): value > 0, lambda(value): value, [], 0, -1, false, "positive values" )
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | descriptiondescription as String |
Compact provider-neutral description used by diagnostics. |
| public readonly property | distinctdistinct as Boolean |
True when duplicate projected values must be removed. |
| public readonly property | limitlimit as Long |
Maximum row count, or -1 when unbounded. |
| public readonly property | offsetoffset as Long |
Number of rows skipped after filtering and ordering. |
| public readonly property | ordersorders as ArrayList<QueryOrderBase<T>> |
Stable ordered list of sort keys. |
| public readonly property | predicatepredicate as QueryPredicate<T> |
Filter operation. |
| public readonly property | qirqir as QirQueryPlan |
Immutable canonical provider representation. |
| public readonly property | selectorselector as QuerySelector<T, R> |
Result projection operation. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | QueryPlanQueryPlan(
predicate as QueryPredicate<T>,
selector as QuerySelector<T, R>,
orders as IList<QueryOrderBase<T>>,
offset as Long,
limit as Long,
distinct as Boolean,
description as String,
qir as QirQueryPlan = null
): |
Creates an immutable query plan. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | addResult | Adds a provider result after enforcing the plan's concrete result type. |
| public | countMemory | Returns the exact number of rows produced in memory. |
| public | executeMemory | Executes this typed plan over a compatible memory source. |
| public | existsMemory | Returns whether this plan produces at least one row in memory. |
| public | newResultListnewResultList() as Object: |
Creates the concrete specialized result list used by providers. |
| public | openMemoryStream | Opens this memory execution as a sequential stream. |
| public | openProviderStreamopenProviderStream(cursor as ProviderResultCursor) as Object: |
Wraps a live provider cursor without materializing its remaining rows. |
| public | openResultStream | Opens a typed stream over an already materialized provider result. |
| public | qirPlanqirPlan() as QirQueryPlan: |
Returns this plan's canonical provider representation. |
| public | withWindowwithWindow(windowOffset as Long, windowLimit as Long) as QueryPlanBase: |
Creates a relative immutable result window. |