A join whose sides are genuinely different databases is executed here: both sides are pulled and the
join is done in memory. Nothing about the operator nodes changes that, because there is no single
target to write one statement against.
ADO.NET offers three ways to make it a server-side join that Calcite's JDBC adapter never used:
- a table-valued parameter,
- a temporary table filled by a bulk copy (
SqlBulkCopy, NpgsqlBinaryImporter),
- a
VALUES list inlined into the statement, for a small enough side.
The rule shape is a converter that takes a join with one side in another convention, plans that side
independently, and emits a statement whose right operand is the shipped rows.
It depends on knowing which side is smaller, which is the statistics gap: today every table is
Calcite's default 100 rows.
This is the largest item in the audit and the only one with no Calcite precedent to copy. It is also
the one that makes this something other than a JDBC adapter.
How this was measured
A scratch test class in Apache.Calcite.Adapter.AdoNet.Tests ran thirty statements against the
SQLite fixture, each twice: once as EXPLAIN PLAN FOR to read the physical plan, once for real
with a Hook.QUERY_PLAN handler counting the statements the adapter sent. Recorded in TODO.md
under "ADO.NET adapter: what more it could push".
A join whose sides are genuinely different databases is executed here: both sides are pulled and the
join is done in memory. Nothing about the operator nodes changes that, because there is no single
target to write one statement against.
ADO.NET offers three ways to make it a server-side join that Calcite's JDBC adapter never used:
SqlBulkCopy,NpgsqlBinaryImporter),VALUESlist inlined into the statement, for a small enough side.The rule shape is a converter that takes a join with one side in another convention, plans that side
independently, and emits a statement whose right operand is the shipped rows.
It depends on knowing which side is smaller, which is the statistics gap: today every table is
Calcite's default 100 rows.
This is the largest item in the audit and the only one with no Calcite precedent to copy. It is also
the one that makes this something other than a JDBC adapter.
How this was measured
A scratch test class in
Apache.Calcite.Adapter.AdoNet.Testsran thirty statements against theSQLite fixture, each twice: once as
EXPLAIN PLAN FORto read the physical plan, once for realwith a
Hook.QUERY_PLANhandler counting the statements the adapter sent. Recorded inTODO.mdunder "ADO.NET adapter: what more it could push".