Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOLD/UNFOLD aggregates highlighted as invalid in Fuseki UI #2843

Open
Ostrzyciel opened this issue Nov 14, 2024 · 2 comments
Open

FOLD/UNFOLD aggregates highlighted as invalid in Fuseki UI #2843

Ostrzyciel opened this issue Nov 14, 2024 · 2 comments

Comments

@Ostrzyciel
Copy link
Contributor

Ostrzyciel commented Nov 14, 2024

Version

5.2.0

What happened?

A recent version of Jena added the support for SPARQL CDTs, which includes a new aggregate (FOLD) and an operator (UNFOLD). The two thingies work fine, but in the SPARQL editor in the Fuseki UI, they are highlighted in red as invalid syntax.

Example query:

SELECT ?s (FOLD(?p, ?o) AS ?map) WHERE {
  ?s ?p ?o
}
GROUP BY ?s

How it appears in the editor:
image

Second example:

SELECT * WHERE {
  ?s ?p ?list .
  UNFOLD(?list as ?element)
}

image

Relevant output and stacktrace

No response

Are you interested in making a pull request?

None

@Ostrzyciel Ostrzyciel added the bug label Nov 14, 2024
@Ostrzyciel
Copy link
Contributor Author

I corrected the report – initially I mistakenly wrote that UNFOLD is an aggregate, while only FOLD is one. Nonetheless, the issue is the same.

@afs
Copy link
Member

afs commented Nov 14, 2024

The syntax highlighter is codemirror based via the maintained yasgui for.

https://github.com/codemirror/codemirror5/blob/master/mode/sparql/sparql.js

As FOLD, UNFOLD and ADJUST are Jena specific extensions, they need adding to the keywords.

Other Jena extensions:

  • LATERAL
  • MEDIAN and MODE
  • SEMIJOIN, ANTIJOIN (coming soon!)
  • LET
  • A few others

More importantly, add the SPARQL Update keywords.

@afs afs added the Fuseki UI label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants