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 per-scan lane ignores column-derived rdf:type in class constraints and type variables #1780
A triples map that derives rdf:type from a column (rr:objectMap [ rr:template "http://example.org/kind/{kind}" ; rr:termType rr:IRI ], or an rr:column IRI map) is invisible to the per-scan R2RML lane's class handling:
?p a <http://example.org/kind/staff> ; ex:name ?n lowers to class_filter, which selects triples maps by tm.classes() (rr:class only), so no map qualifies and the query answers no rows with no error.
?p a ?t (type_var) emits one row per rr:class of the map; a column-derived class never appears.
tm_passes_star_prune and the rewrite's class-fusion checks (class_fusion_is_safe, class_declares_predicate) use the same static class list.
The policy gate already derives each row's classes from the projected type columns (derived_row_classes, R2rmlPolicyGate::needs_row_classes), so the row-level machinery exists; it is only used for view policies, not for answering the query.
Where this shows
The SQL pushdown lane answers both shapes on feature/sql-pushdown-lane-m1 (a derived class becomes a predicate on its column: "t0"."kind" = 'staff'), so a query flips between the right answer and an empty one with FLUREE_SQL_PUSHDOWN_LANE=0. Its test a_column_derived_class_constrains_the_column in fluree-db-api/tests/it_sql_pushdown_lane.rs is lane-only for this reason. Iceberg sources have no other lane, so they always get the empty answer.
Expected
A constant class selects every map that can produce it (statically, or through a single-column derived type map that reverses to a column value), and rows are kept only when the derived class equals the constant.
?s a ?t emits the derived class per row alongside the static ones.
The fusion and prune checks treat a derived-type map as possibly declaring any class (decline to fuse, never prune it away).
Reproducer: the shop.people fixture and TYPED_R2RML mapping in it_sql_pushdown_lane.rs; run the SPARQL above with FLUREE_DISABLE_QUERY_FAST_PATHS=1.
Activity
feat(sql): push class policies over a column-derived rdf:type as a pr…