@bijectionhq/library-relations are lowered into each
warehouse’s own dialect, and native text is written in that dialect. One
dialect module per warehouse protocol decides what is admitted. bijection check and the provider gateway run the same module at the compiler revision
the lock records (semantics@13.9 today), so a statement passes at the
gateway exactly when it passed at check.
Each module carries three things: a capability catalog, a function table and
a fixed settings profile. A change to any of them is a new compiler revision,
and the lock prints it.
Capabilities
- Cut. A relation’s
travelneeds a cut. Without one, a dated read refusesTravelMissing. A cut with an engine bound, such as BigQuery’s seven days, also limits the derived window. - Forwards. Only Trino forwards a federated statement through its catalogs.
- Left join. A left join, or a fused chain of key routes, needs a miss to read null rather than column defaults. ClickHouse gets this from its profile.
- Arithmetic and values. A typed relation’s integer arithmetic needs an engine that fails on overflow, as the relation’s own semantics do. Without it, the arithmetic refuses at check. On an engine without boolean values, a predicate cannot be a field or a key.
- Column kinds. A field whose kind the wire cannot carry exactly refuses at check.
Join across Trino catalogs
Declare the upstream warehouses and their source relations first. In the following example,items and tickets come from Snowflake and Databricks.
Each relation declares its own deletion signal.
lifetime on the virtual table.
Function classes
Native text may call a function only when the dialect’s table classifies it. Typed relations admit only the deterministic classes.
Every dialect shares this table:
Each dialect adds its own entries, which take precedence:
A typed relation’s aggregates are
count, sum, minimum, maximum and a
distinct count, lowered to the shared aggregates.
Row bounds and population totals
The module also spells the bounded statements Bijection renders. A row bound isLIMIT n by default, TOP n on SAP ASE, TOP (n) on SQL Server and
FETCH FIRST n ROWS ONLY on Oracle and Db2. A population statement groups
by distinct subject and computes the aggregate over that cut before
limiting the returned witnesses. It returns up to its reviewed subject
cap, with each row carrying the same aggregate and distinct-subject count.
The compiler requires window support and exact subject equality. It
supports int64 subjects and text subjects on PostgreSQL and ClickHouse.
Member population statements also require exact source member equality.
Population total limits
Settings profiles
A profile is a fixed set of request settings sent with every statement of the dialect, typed and native alike. A statement cannot carrySETTINGS.
ClickHouse merged reads are not a profile setting. A relation declares them,
and its references render through
FINAL in the committed statement (see
merged reads).