You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
R2RML graph sources: verify each snapshot's table keys before trusting them #2320
Since #2317, an R2RML graph source skips deduplication for a map whose subject a table key proves unique. Keys come from f:key on the logical table, from an Iceberg table's identifier-field-ids (format versions 1 to 3), or from a SQL source's registration probe (verified_subject_keys). They are trusted, not verified. Iceberg does not enforce identifier fields, an f:key is only a declaration, and the SQL probe sees a table only as it was when it ran.
Over a table that breaks its key (two rows with the same key values), the answer is wrong:
queries return the repeated solutions the key ruled out, so the graph source answers as a bag rather than as the set of triples its mapping defines;
a class or property count that /info reads from table metadata is presented as exact when it is not.
Expected
A key is checked against the data of the snapshot that uses it, once per snapshot and table, with the verdict kept by snapshot id. Snapshots are immutable, so a verdict never goes stale.
When a check finds a violation, the source falls back to the deduplicating lanes for the affected maps and reports a non-exact count (null, with an upper bound where one is provable), and says why in a warning.
The cost stays off the hot path: a check that would read the whole table runs in the background or on demand (fluree iceberg check-style), and until it has run the source behaves as today.
Notes
Manifest column statistics can't prove uniqueness, but they can sometimes disprove it cheaply (for example a single-file table whose key column has fewer distinct values than rows, where distinct counts are written).
The SQL lane has the same gap between fluree sql check runs. Re-probing on a schedule or per connection is the analogue.
Activity