Apache Ignite 2

SQL planning, constraints, control commands and discovery

Public product properties reconstructed from test evidence.

SQL planning, constraints, control commands and discovery

This page is a public product-spec reconstruction from Apache Ignite 2 test sources at revision 486a6367610c4c891b729e89373695ef83165345.

These requirements cover tested SQL planner behavior, NOT NULL constraint enforcement, distributed SQL splitting, control-command operator contracts, and TCP discovery convergence.

User-facing guarantees

Traceable requirements

Only negative or ambiguous test status is annotated after a test name, for example status=failed, status=flaky, status=ignored, or status=mixed.

REQ-B4-CALCITE-MERGE-JOIN-PLANNER — Calcite planner selects merge join only for supported equi/is-not-distinct join conditions

Requirement: Calcite planner selects merge join only for supported equi/is-not-distinct join conditions, derives or preserves input collation through inner/right/left/full joins, avoids top sorts when child ordering is sufficient, and does not use merge join for non-equi joins.

Why: join planning must exploit ordering without introducing invalid physical plans.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-CALCITE-SECONDARY-INDEX-FILTERS — Calcite SQL uses primary-key

Requirement: Calcite SQL uses primary-key, affinity-key, secondary, date, and composite indexes for eligible equality/range/AND/OR filters and falls back to table scans where fields are not indexed or conditions are not indexable, while preserving result rows.

Why: users get predictable indexed access without wrong answers.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-CALCITE-SECONDARY-INDEX-ORDER — Calcite SQL can satisfy ORDER BY and range-bound queries from suitable indexes

Requirement: Calcite SQL can satisfy ORDER BY and range-bound queries from suitable indexes, avoid redundant sort/project nodes in eligible cases, merge overlapping index bounds, and keep correct ordering/results for indexed and non-indexed order expressions.

Why: sorted/range queries should be efficient and stable.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-CONTROL-CACHE-DIAGNOSTICS — control utility cache commands detect idle-verify conflicts

Requirement: The control utility cache commands detect idle-verify conflicts, write/read dumps, filter caches/groups/nodes/system caches, scan cache entries in default/table/JSON formats with limits, show cache configuration/affinity/distribution, reset lost partitions, clear caches with confirmation, and report garbage absence.

Why: operators need accurate cache inspection and repair tooling.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-CONTROL-CLUSTER-STATE-BASELINE — control utility reports and changes cluster state/tag/baseline/shutdown policy

Requirement: The control utility reports and changes cluster state/tag/baseline/shutdown policy, transaction info, and connectivity diagnostics with validated arguments, state transitions, and operator-visible output.

Why: operators need reliable cluster lifecycle and diagnostic commands.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-CONTROL-HELP-VERBOSE-EXPERIMENTAL — control utility help

Requirement: The control utility help, cache help, offline command dispatch, timestamp footer, experimental-command gating, and verbose error handling expose documented commands and stack traces according to flags.

Why: operators need discoverable and debuggable CLI behavior.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-CONTROL-SNAPSHOT-WAL-WARMUP — control utility snapshot

Requirement: The control utility snapshot, WAL, and warm-up commands validate arguments, create/check/cancel/restore full and incremental snapshots including custom directories and synchronous mode, surface warnings/errors, report status, restrict inactive-cluster operations, target unused WAL by node, and stop warm-up when supported.

Why: persistence operations must be observable and recoverable from CLI.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-DISCOVERY-TCP-CLIENT — TCP client discovery supports client join/leave/fail events

Requirement: TCP client discovery supports client join/leave/fail events, client/server pings, router failover/reconnect after suspend/network/topology changes, missed-message recovery, segmentation, metrics/data exchange, duplicate-ID and join-timeout errors, client worker startup, concurrent joins, disabled reconnect failure handling, forced reconnect, and stable grid start time.

Why: client nodes must remain observable and recover from discovery disruptions without corrupting topology.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-DISCOVERY-TCP-SERVER — TCP server discovery supports node start/stop

Requirement: TCP server discovery supports node start/stop, ping/failure detection, node add/leave/fail events, metrics propagation, IP finder cleanup/multicast validation, join timeout/duplicate/loopback errors, custom event races/coordinator failures, failed-node recovery, topology cleanup, marshaller-data filtering, discovery-data deduplication, ring latency checks, and unresolved-address filtering.

Why: server topology membership must converge predictably under normal and failure conditions.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-H2-SUBQUERY-JOIN-OPT — H2 SQL subquery join optimization preserves query semantics while applying eligible rewrites for SELECT expressions

Requirement: H2 SQL subquery join optimization preserves query semantics while applying eligible rewrites for SELECT expressions, table-list subqueries, EXISTS/IN/NOT IN predicates, aliases, constants, UNION branches, casts, CASE expressions, left joins with false predicates, and nested subqueries; unsupported aggregate/distinct/correlated shapes remain unoptimized.

Why: users get faster distributed SQL without changing query answers.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-SQL-NOT-NULL-CACHE-OPS — Not-null QueryEntity constraints are enforced for cache API writes

Requirement: Not-null QueryEntity constraints are enforced for cache API writes, entry processor mutations, putAll/invokeAll, atomic/implicit operations, and explicit transactions, while delete/no-value mutations remain allowed.

Why: data integrity must hold regardless of the write API used.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-SQL-NOT-NULL-DML-DDL — SQL DDL may declare or add NOT NULL fields on supported caches and SQL DML rejects INSERT/UPDATE paths that would write

Requirement: SQL DDL may declare or add NOT NULL fields on supported caches and SQL DML rejects INSERT/UPDATE paths that would write null into constrained fields; read-through and interceptor caches reject not-null query entities/create-table/alter-table constraints.

Why: SQL constraints must be enforced uniformly and only where Ignite can guarantee them.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-SQL-NOT-NULL-METADATA — QueryEntity stores not-null field metadata in getter/setter state and equality semantics

Requirement: QueryEntity stores not-null field metadata in getter/setter state and equality semantics.

Why: cache/table definitions must remain comparable and reproducible across configuration paths.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-SQL-SPLITTER-AGGREGATES-INDEXES — SQL aggregation

Requirement: SQL aggregation, HAVING, AVG over numeric types, empty-cache aggregates, group-index bounds, index hints, and sorted merge index plans return correct results and expose the expected plan markers.

Why: analytical SQL must be numerically correct and planner choices must be observable.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-SQL-SPLITTER-DISTRIBUTED-JOINS — Distributed joins choose batched/unicast or colocated plans according to partitioned/replicated cache placement

Requirement: Distributed joins choose batched/unicast or colocated plans according to partitioned/replicated cache placement, segmentation level, distributedJoins/enforceJoinOrder flags, and local query settings; incompatible segmentation fails instead of returning ambiguous results.

Why: mixed cache deployments need predictable join correctness and operability.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

REQ-B4-SQL-SPLITTER-PAGING-PUSHDOWN — SQL splitter applies LIMIT/OFFSET

Requirement: The SQL splitter applies LIMIT/OFFSET, subquery pushdown, schema name resolution, EXISTS/subquery joins, implicit join-condition generation, and function-expression queries consistently across distributed execution.

Why: users expect distributed SQL to return the same rows as logical SQL while minimizing unnecessary reducer work.

Boundary: These tests prove the named fixtures and query/CLI/discovery shapes only; they do not prove arbitrary SQL equivalence, every cache mode, every topology size, production timing, or all failure interleavings beyond the exercised scenarios.

Evidence tests:

Important boundaries