Conversation
✅ Deploy Preview for thriving-cassata-78ae72 canceled.
|
|
| # A physical table backs one source node in practice, a handful at most (the | ||
| # same table registered under different namespaces). ``find_by`` always applies | ||
| # some limit, so pick one well clear of that. | ||
| MAX_SOURCE_NODES = 1000 |
There was a problem hiding this comment.
Table results are silently truncated
If more than 1,000 source nodes reference one physical table, this limit returns only the newest 1,000. The query never traverses the omitted sources, so nodesForTable also leaves out their downstream nodes despite promising everything downstream of the table. Source registration does not enforce a per-table limit.
| UniqueConstraint("version", "node_id"), | ||
| Index("ix_noderevision_node_id", "node_id"), | ||
| # Backs the ``tables`` filter (find nodes by physical table). | ||
| Index("ix_noderevision_table", "catalog_id", "schema_", "table"), |
There was a problem hiding this comment.
The filter compares lower(table) and, for qualified names, lower(schema_), but this index stores the original column values. Bare-table lookups also do not constrain its leading catalog_id column. As a result, the new index does not provide the intended lookup benefit while still adding index maintenance cost.
d2e3218 to
c30bb3b
Compare
Adds a `tables` filter to findNodes/findNodesPaginated matching nodes by physical table, and a `nodesForTable` query that returns the source nodes on a table plus everything downstream. Table entries may be fully or partially qualified, or bare. Indexes noderevision on (catalog_id, schema_, table) to back the filter. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
c30bb3b to
207d7c3
Compare
Adds a
tablesfilter to findNodes/findNodesPaginated matching nodes by physical table, and anodesForTablequery that returns the source nodes on a table plus everything downstream. Table entries may be fully or partially qualified, or bare.Indexes noderevision on (catalog_id, schema_, table) to back the filter.
Summary
Test Plan
make checkpassesmake testshows 100% unit test coverageDeployment Plan