apache / apache/jena

FOLD/UNFOLD aggregates highlighted as invalid in Fuseki UI

Open
#2,843 2 comments 0 reactions 0 assignees View on GitHub
bug Fuseki UI
Dominant language
Java
Stars
1.4k
Forks
712
Avg merge
15h 41m
Merged PRs (30d)
53

Description

### Version

5.2.0

### What happened?

A recent version of Jena added the support for [SPARQL CDTs](https://awslabs.github.io/SPARQL-CDTs/spec/latest.html#description-of-fold), 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:

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

How it appears in the editor:
![image](https://github.com/user-attachments/assets/63acbe7d-a6ee-4dd8-8e6e-b7dd4fa39f02)

Second example:

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

![image](https://github.com/user-attachments/assets/84f25f3e-5eca-4232-ac90-532fff27fab3)

### Relevant output and stacktrace

_No response_

### Are you interested in making a pull request?

None

Contributor guide

Open the contributing guide

Research direction

Start in the Fuseki UI's SPARQL editor and inspect the syntax-highlighting definitions for aggregate functions and operators. Compare the handling of FOLD and UNFOLD with other valid SPARQL syntax, then verify that both examples are no longer highlighted as invalid.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.