Skip to content

339 [SPARQL 1.1] - Parser and AST not exist and exist#445

Merged
MaillPierre merged 2 commits into
feature/corese-nextfrom
feature/339-Parser-and-ast-not-exist-exist
May 20, 2026
Merged

339 [SPARQL 1.1] - Parser and AST not exist and exist#445
MaillPierre merged 2 commits into
feature/corese-nextfrom
feature/339-Parser-and-ast-not-exist-exist

Conversation

@prbblrypier
Copy link
Copy Markdown
Contributor

Added BooleanExpressionAst to NotExist and Exist record.
Added a throw new QueryEvaluationException when poping exist or not exist pattern

@prbblrypier prbblrypier added the Refactoring Issue created during the 2025 refactoring effort label Apr 30, 2026
@prbblrypier prbblrypier linked an issue Apr 30, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

Overall Project 49% 🍏
Files changed 82.14% 🍏

File Coverage
NotExistsAst.java 100% 🍏
ExistsAst.java 100% 🍏
SparqlAstBuilder.java 83.81% -0.32% 🍏

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Test Results

  401 files  ±0    401 suites  ±0   1m 1s ⏱️ +18s
2 197 tests +2  2 197 ✅ +2  0 💤 ±0  0 ❌ ±0 
2 211 runs  +2  2 211 ✅ +2  0 💤 ±0  0 ❌ ±0 

Results for commit ecc4405. ± Comparison against base commit 280990d.

♻️ This comment has been updated with latest results.

@remiceres
Copy link
Copy Markdown
Contributor

I added tests for !EXISTS and !NOT EXISTS in FILTER.
I removed the redundant ConstraintAst in ExistsAst and NotExistsAst.

@github-actions
Copy link
Copy Markdown

Overall Project 49% 🍏
Files changed 82.14% 🍏

File Coverage
NotExistsAst.java 100% 🍏
ExistsAst.java 100% 🍏
SparqlAstBuilder.java 83.81% -0.32% 🍏

@prbblrypier prbblrypier self-assigned this May 6, 2026
QueryAst ast = parser.parse("""
SELECT * WHERE {
?s ?p ?o .
FILTER(!EXISTS { ?s ex:email ?e })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, why a ! here ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that it's to test Not over Exists, and to make sure the parser accepts FILTER(!EXISTS{}. In the future when we evaluate the SPARQL query it should give the same result as FILTER NOT EXISTS {}, but it does not produce the same AST

@MaillPierre MaillPierre merged commit e4684ae into feature/corese-next May 20, 2026
2 checks passed
@MaillPierre MaillPierre deleted the feature/339-Parser-and-ast-not-exist-exist branch May 20, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactoring Issue created during the 2025 refactoring effort

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SPARQL 1.1] - Parser and AST : NOT (NOT EXISTS/EXIST)

3 participants