Skip to content

v0.3.3

Latest

Choose a tag to compare

@MathiasVDA MathiasVDA released this 01 Dec 22:16
5cd7f9a

Fixes found by running 0.3.x in production ETL pipelines: a SHACL rule that made tripletrail infer look stuck, SHACL-SPARQL constraints that use $this only in a nested group, a missing lift input reported as outside the allowed directories, and CSV results with IRIs holding a comma. Graph grants are tightened for queries with GRAPH patterns. Users of graph grants should upgrade.

Upgrading from 0.3.2

  • Store format. Unchanged: 0.3.3 opens 0.3.2 datasets as they are, and 0.3.2 opens datasets 0.3.3 wrote.
  • Graph grants. Users of graph grants (sg:readGraph) should upgrade.

Fixed

  • A query with a GRAPH pattern from a caller limited to some graphs (sg:readGraph) is answered by the general evaluator, which reads GRAPH within the caller's named graphs.
  • SPARQL CSV results (text/csv) quote an IRI that holds a comma (#714), as RFC 4180 and the SPARQL 1.1 CSV format ask and as literals already were: a client read such a row as having too many fields. ERA's RINF data has such IRIs. A triple term with a comma, a quote or a line break in any part is quoted as one field too.
  • FILTER NOT EXISTS { … } and FILTER EXISTS { … } with a BIND in the pattern are looked up from the row's own values again (#671). The planner orders the triples of such a pattern from the variables the row binds (a rule's $this, say), but left them in their written order when the pattern also had a BIND, as an overlap check of normalised begin and end coordinates does; a pattern starting from every area of the network then ran once per row. A SHACL rule of that form took 1,397 s of a 1,566 s tripletrail infer run on a 20M-triple graph, and looked stuck; on a synthetic graph of 3.6M triples it went from over 15 minutes to 0.12 s, with the same triples.
  • With --allow (and the server's Facade-X allowed directories), a Facade-X location that is missing inside an allowed directory is reported as missing ("cannot read … (os error 2)"), as without --allow (#645). It was refused as outside the allowed directories when the resolved path differed from the one given: on Windows, and on a base reached through a symbolic link. Paths outside the directories, missing or not, and links that leave them are still refused as outside.
  • A SHACL-SPARQL constraint whose $this is used only inside a nested group, such as a UNION branch holding only FILTER NOT EXISTS { $this ex:p ?v }, now reports its focus nodes (#668). $this was bound where the query's outer pattern joins it, so such a group, which SPARQL evaluates on its own, saw it unbound and the constraint gave no result. It is now pre-bound in every group that uses it (the right side of a join, OPTIONAL, UNION branches, GRAPH), as SHACL asks and as pySHACL and TopBraid do. SHACL-AF SPARQL rules get the same fix.

Commits since v0.3.2

Fixes

  • fix(access): answer GRAPH patterns of graph-limited callers with the evaluator (0.3.x) (#713) (c0004f3)
  • fix(shacl): pre-bind $this in the nested groups of a SPARQL constraint (#675) (9dad5ee)
  • fix(fx): report a missing file inside the allowed directories as missing (#667) (a5cb0dc)

Performance

Other changes