fdb-record-layer
fdb-record-layer copied to clipboard
Cascades should match record type key field with record type restrictions
The Cascades planner currently doesn't match record type keys at all during planning. This can be a problem for operations like querying for a single type when the primary key is prefixed by the record type key. In that case, we'd want a query equivalent to SELECT * FROM aTable
to be executed by a scanning just the records of that type:
Scan([IS aTable])
(Which is how the old planner plans such a query.) Instead, the planner doesn't match the record type key, and so the plan is executed as:
Scan(<,>) | [aTable]
That is, as a full scan with a type-filter on aTable
after it.