> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Interface: AnswerPlan

> The selected executable plan, using logical names and result bounds.

[server](/api/modules/server).AnswerPlan

The selected executable plan, using logical names and result bounds.

## Properties

### strategy

• **strategy**: `"remote_statement"` | `"input_upload"` | `"residual"`

***

### provider

• **provider**: `null` | `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"`

***

### inputs

• **inputs**: \{ `table`: `string` ; `fields`: `string`\[] ; `parameter_rows?`: `number` ; `predicate_fields?`: `string`\[]  }\[]

***

### output

• **output**: \{ `name`: `string` ; `kind`: `null` | `string` ; `nullable`: `boolean` ; `optional`: `boolean`  }\[]

***

### fragments

• `Optional` **fragments**: \{ `id`: \{ `kind`: `"rows"` | `"aggregate_state"` ; `node`: `number`  } ; `node`: `number` ; `tables`: `string`\[] ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"` ; `output`: \{ `name`: `string` ; `kind`: `null` | `string` ; `nullable`: `boolean` ; `optional`: `boolean`  }\[] ; `validations`: (`"complete_result"` | `"exact_cells"` | `"required_values"` | `"integer_sum_overflow"` | `"join_cardinality"` | `"integer_arithmetic"`)\[]  }\[]

Source subtrees completed before the remaining cross-source computation.

***

### compute

• `Optional` **compute**: `Object`

Byte budgets of isolated query compute; rows are not a separate budget.

#### Type declaration

| Name | Type | Description |
| :- | :- | :- |
| `input_bytes` | `number` | All inputs and source fragments, in accounted canonical bytes. |
| `cell_bytes` | `number` | One cell's canonical text. |
| `intermediate_bytes` | `number` | Cumulative output of one query node. |
| `memory_pool_bytes` | `number` | Tracked memory before spilling to run-scoped files. |
| `spill_bytes` | `number` | - |
| `heap_bytes` | `number` | - |

***

### parameter\_count

• **parameter\_count**: `number`

***

### alternatives

• `Optional` **alternatives**: \{ `logical_alternative`: `number` ; `fragments`: \{ `kind`: `"rows"` | `"aggregate_state"` ; `node`: `number`  }\[] ; `join_filters`: \{ `build_table`: `string` ; `build_field`: `string` ; `probe_table`: `string` ; `probe_field`: `string`  }\[] ; `join_filter_pricing`: `null` | `"overflow"` | `"estimated"` | `"unknown_selectivity"` | `"fragment_estimate_unknown"` | `"scan_estimate_unknown"` | `"key_statistics_unknown"` | `"key_width_unknown"` | `"dependency_cycle"` ; `statements`: `number` ; `pushed_nodes`: `number` ; `estimated_output_bytes`: `null` | `number` ; `estimated_source_work_bytes`: `null` | `number` ; `estimated_source_micros`: `null` | `number` ; `estimated_micros_range?`: \{ `few`: `null` | `number` ; `many`: `null` | `number`  } ; `compute`: \{ `model`: `"fixed_prior"` ; `input_micros`: `null` | `number` ; `operator_micros`: `null` | `number` ; `validation_micros`: `null` | `number` ; `spill_micros`: `null` | `number` ; `working_bytes`: `null` | `number` ; `spill_io_bytes`: `null` | `number`  } ; `local_input_bytes`: `number` ; `selected`: `boolean`  }\[]

***

### search\_budget\_exhausted

• `Optional` **search\_budget\_exhausted**: `boolean`

***

### search

• `Optional` **search**: `Object`

Deterministic search evidence; absent for whole-source execution.

#### Type declaration

| Name | Type | Description |
| :- | :- | :- |
| `work` | `number` | - |
| `work_limit` | `number` | - |
| `resumed_work` | `number` | - |
| `phases` | `Partial`\<`Record`\<`"cardinality"` \| `"logical_rule"` \| `"join_enumeration"` \| `"extraction"` \| `"source_implementation"` \| `"physical_combination"` \| `"join_filter"`, `number`>> | - |
| `limits` | (`"join_enumeration"` \| `"work"` \| `"logical_shape"` \| `"placement_frontier"` \| `"join_filter_frontier"` \| `"complete_plan_frontier"`)\[] | - |
| `logical_groups` | `number` | - |
| `estimated_groups` | `number` | - |
| `estimate_reuses` | `number` | - |
| `logical_expressions` | `number` | - |
| `import_reuses` | `number` | - |
| `logical_recipes` | `number` | - |
| `rule_applications` | `number` | - |
| `child_combinations` | `number` | - |
| `pending_tasks` | `number` | - |
| `physical_requests` | `number` | - |
| `physical_implementations` | `number` | - |
| `request_states` | `Partial`\<`Record`\<`"pending"` \| `"complete"` \| `"empty"` \| `"waiting_cycle"` \| `"work_stopped"`, `number`>> | - |
| `reopened_requests` | `number` | - |
| `extracted_trees` | `number` | - |
| `duplicate_trees` | `number` | - |
| `priced_placements` | `number` | - |
| `source_requests` | `number` | - |
| `source_reuses` | `number` | - |
| `source_compilations` | `number` | - |
| `source_cache_evictions` | `number` | - |
| `filter_graph_requests` | `number` | - |
| `filter_graph_reuses` | `number` | - |
| `filter_graph_skips` | `number` | Requests not searched: a lower bound of every dependency graph cost more than the full retained-plan frontier. |
| `filter_graph_entries` | `number` | - |
| `filter_graph_key_bytes` | `number` | Retained serialized request keys, not total planner heap use. |
| `retained_plans` | `number` | - |

***

### cardinalities

• `Optional` **cardinalities**: \{ `tables`: `string`\[] ; `rows`: `null` | `number` ; `output_bytes`: `null` | `number` ; `basis`: `"unknown"` | `"statistics"` | `"heuristic"` | `"override"`  }\[]

Estimated rows per relation set of the query. Estimates, never bounds.

***

### statistics

• `Optional` **statistics**: \{ `table`: `string` ; `status`: `"unavailable"` | `"fetched"` | `"cached"` | `"local"` | `"withheld"` | `"observed_restricted"` | `"not_requested"` ; `rows`: `null` | `number` ; `rows_origin`: `null` | `"observed"` | `"local"` | `"catalog"` | `"analyzed"` | `"feedback"` ; `data_bytes`: `null` | `number` ; `observed_columns`: `number` ; `columns?`: \{ `field`: `string` ; `distinct`: `null` | `"observed"` | `"local"` | `"catalog"` | `"analyzed"` | `"feedback"` ; `null_fraction`: `null` | `"observed"` | `"local"` | `"catalog"` | `"analyzed"` | `"feedback"` ; `bounds`: `null` | `"observed"` | `"local"` | `"catalog"` | `"analyzed"` | `"feedback"`  }\[] ; `age_ms`: `null` | `number` ; `versioned`: `boolean` ; `analysis?`: \{ `age_ms`: `number` ; `versioned`: `boolean`  } ; `filtered?`: \{ `origin`: `"observed"` | `"feedback"` ; `fields`: `string`\[] ; `min_rows`: `number` ; `max_rows`: `number` ; `samples`: `number` ; `age_ms`: `null` | `number` ; `versioned`: `boolean`  }  }\[]

Source statistics behind the estimates. Whole-table values appear only
for unrestricted reads; an `observed_restricted` input's values describe
exactly its restricted read.

***

### selection

• `Optional` **selection**: `"single_source_observation"` | `"comparable_cost_estimate"` | `"robust_cost_estimate"` | `"structural_preference"` | `"qualification_alternative"`

Why the complete implementation was selected. Estimates never imply authority.

***

### rules

• `Optional` **rules**: \{ `tables`: `string`\[] ; `rule`: `"aggregate_before_join"` | `"join_reorder"` | `"predicate_pushdown"` | `"derived_predicate"` | `"top_n_pushdown"`  }\[]

Transformations applied to the selected logical expression.

***

### constraints

• `Optional` **constraints**: \{ `tables`: `string`\[] ; `reason`: `"parameter_relation_unsupported"` | `"validation_barrier"` | `"operator_unsupported"` | `"disclosure_refused"` | `"input_shape_bound"`  }\[]

Execution properties that an offered source implementation could not satisfy.

***

### calibration

• `Optional` **calibration**: \{ `tables`: `string`\[] ; `provider`: `"snowflake"` | `"databricks"` | `"duckdb"` | `"clickhouse"` ; `profile`: \{ `statement_micros`: `number` ; `statement_origin`: `"prior"` | `"measured"` ; `bytes_per_ms`: `number` ; `throughput_origin`: `"prior"` | `"measured"` ; `work_bytes_per_ms`: `number` ; `work_origin`: `"prior"` | `"measured"` ; `samples`: `number` ; `usable_samples`: `number`  } ; `recorded`: `number`  }\[]

The total response profile each source connection's statements were priced
with: fitted from its recorded statements (`measured`) or the provider's
fixed prior. Estimates, never bounds.

***

### logical\_alternatives

• `Optional` **logical\_alternatives**: \{ `origin`: `"written"` | `"memo"` ; `enumeration`: `null` | `"exact"` | `"bounded"` ; `tree`: `string` ; `statements`: `number` ; `estimated_source_micros`: `null` | `number` ; `estimated_compute_micros`: `null` | `number` ; `selected`: `boolean`  }\[]

Retained logical alternatives, the written expression first. Complete implementations
identify their logical alternative and its negotiated fragments.

***

### max\_rows

• **max\_rows**: `number`

***

### max\_bytes

• **max\_bytes**: `number`

***

### validations

• **validations**: (`"complete_result"` | `"exact_cells"` | `"required_values"` | `"integer_sum_overflow"` | `"join_cardinality"` | `"integer_arithmetic"`)\[]

***

### crossings

• `Optional` **crossings**: \{ `crossing`: \{ `kind`: `"rows"` ; `fields`: `string`\[] ; `from`: `string` ; `to`: \{ site: "compute"; }  } | \{ `kind`: `"state"` ; `fields`: `string`\[] ; `from`: `string` ; `to`: \{ site: "compute"; }  } | \{ `kind`: `"keys"` ; `fields`: `string`\[] ; `from`: `string` ; `to`: \{ target: string; source: string; site: "source"; }  } | \{ `kind`: `"range"` ; `fields`: `string`\[] ; `from`: `string` ; `to`: \{ target: string; source: string; site: "source"; }  } | \{ `kind`: `"values"` ; `fields`: `string`\[] ; `from`: `null` | `string` ; `to`: \{ target: string; source: string; site: "source"; }  } ; `decision`: `"refused"` | `"admitted"` | `"implied"` | `"unasked"` ; `estimated_bytes`: `null` | `number`  }\[]

What the plan moves between sites and how each crossing was decided:
field names, never values. `implied` crossings follow from admitted rows
or keys of the same fields.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.