comunica / sparqlee

⚙️ SPARQL expression evaluator library - Moved to @comunica/expression-evaluator
https://www.npmjs.com/package/sparqlee
14 stars 7 forks source link

Support wildcards #48

Closed joachimvh closed 5 years ago

joachimvh commented 5 years ago

This makes sure sparqlee can handle algebra with wildcards in it.

This is required for comunica/comunica#542

This can only happen in 1 specific instance and that is a count(*). That is the only time a wildcard can appear (yay for edge cases). The fix is to convert the wildcard to a namednode('*') which is how wildcards were previously handled. You could also make internal representations of wildcards but that would probably require quite some additional changes (and sparqlee is never going to output a wildcard).

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 264


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/Transformation.ts 0 3 0.0%
<!-- Total: 0 3 0.0% -->
Files with Coverage Reduction New Missed Lines %
lib/Transformation.ts 1 72.61%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 259: -0.3%
Covered Lines: 2092
Relevant Lines: 2532

💛 - Coveralls
wschella commented 5 years ago

This should work, since the Count aggregator state machine actually ignores the term that results from evaluating the expression (the NamedNode) in this case. Should probably be tested somewhere tho, so i made #50 .

rubensworks commented 5 years ago

Released as 1.3.0. @joachimvh, could you update the Comunica PR with this?

joachimvh commented 5 years ago

Will do