Skip to content

Conversation

ehrhart
Copy link
Contributor

@ehrhart ehrhart commented Aug 27, 2024

Using aggregates with a variable (e.g., { v: "?v$sum" }) would "incorrectly" generate SPARQL queries like: (SUM(?v) AS ?v). While technically accepted/ignored by Virtuoso, it causes errors with stricter engines like GraphDB.

The naming convention is now adjusted to generate unique variable names, such as (SUM(?v) AS ?v_sum).
It was already the case when using expressions such as $schema:value$sum, but it didn't apply to variables.
This commit fixes that behavior.


✔ DBpedia list of cities (proto)
✔ DBpedia list of cities and regions (jsonld)
✔ DBpedia grunge bands
✔ DBpedia genres with bands
✔ Aggregates
✔ No lang tag
✔ Duplicate variable name
✔ List-required fieds
✔ Library limit (103ms)

9 tests passed

Using aggregates with a variable (e.g., `{ v: "?v$sum" }`) would incorrectly generate SPARQL queries like "(SUM(?v) AS ?v)", leading to invalid queries in stricter engines like GraphDB. The naming convention is now adjusted to generate unique variable names, such as "(SUM(?v) AS ?v_sum)". This was already the case when using expressions such as "$schema:value$sum", but it didn't apply to variables. This commit fixes that behavior.
@ehrhart ehrhart requested a review from pasqLisena August 27, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant