Skip to content

Add unsupported query feature exception#488

Merged
abdessamad-abdoun merged 1 commit into
feature/corese-nextfrom
feature/487-unsupported-query-feature-exception
Jul 16, 2026
Merged

Add unsupported query feature exception#488
abdessamad-abdoun merged 1 commit into
feature/corese-nextfrom
feature/487-unsupported-query-feature-exception

Conversation

@remiceres

@remiceres remiceres commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Closes #487.

This PR adds a dedicated exception for SPARQL features that are valid but not supported yet by the next pipeline.

It replaces a few bridge-level UnsupportedOperationException cases with UnsupportedQueryFeatureException and updates the related tests.

@remiceres remiceres self-assigned this Jul 15, 2026
@remiceres remiceres added the Refactoring Issue created during the 2025 refactoring effort label Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Overall Project 51.05% -0.02% 🍏
Files changed 38.54%

File Coverage
WhereCompiler.java 100% 🍏
CoreseAstQueryBuilder.java 90.41% -4.05%
UnsupportedQueryFeatureException.java 44.44% -55.56%
SparqlAstToExpression.java 26.97% -1.83%

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

Test Results

  435 files    435 suites   30s ⏱️
2 496 tests 2 496 ✅ 0 💤 0 ❌
2 510 runs  2 510 ✅ 0 💤 0 ❌

Results for commit 47988d4.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a dedicated UnsupportedQueryFeatureException to consistently report syntactically valid SPARQL features that are not yet implemented in the “next” pipeline, and updates the bridge/runtime code paths and tests to use this typed exception instead of UnsupportedOperationException.

Changes:

  • Add UnsupportedQueryFeatureException to the next query API exception set.
  • Replace several bridge-level UnsupportedOperationException throws with UnsupportedQueryFeatureException (WHERE compilation, filter conversion, query builder clause rejection).
  • Update/extend bridge tests to assert the new exception type is raised for unsupported-but-valid features.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/java/fr/inria/corese/core/next/query/api/exception/UnsupportedQueryFeatureException.java Adds the new dedicated exception type for unsupported query features.
src/main/java/fr/inria/corese/core/next/query/impl/sparql/bridge/WhereCompiler.java Throws UnsupportedQueryFeatureException for unsupported WHERE pattern kinds.
src/main/java/fr/inria/corese/core/next/query/impl/sparql/bridge/SparqlAstToExpression.java Throws UnsupportedQueryFeatureException for unsupported constraint/filter conversions (e.g., EXISTS).
src/main/java/fr/inria/corese/core/next/query/impl/sparql/bridge/CoreseAstQueryBuilder.java Standardizes unsupported-feature failures in query building to use the new exception type.
src/test/java/fr/inria/corese/core/next/query/impl/sparql/bridge/WhereCompilerTest.java Adds coverage asserting unsupported WHERE patterns fail with the typed exception.
src/test/java/fr/inria/corese/core/next/query/impl/sparql/bridge/SparqlAstToExpressionTest.java Adds coverage asserting EXISTS filter conversion fails with the typed exception.
src/test/java/fr/inria/corese/core/next/query/impl/sparql/bridge/CoreseAstQueryBuilderDescribeTest.java Updates tests to expect UnsupportedQueryFeatureException for unsupported DESCRIBE clauses.
src/test/java/fr/inria/corese/core/next/query/impl/sparql/bridge/CoreseAstQueryBuilderConstructTest.java Updates tests to expect UnsupportedQueryFeatureException for unsupported CONSTRUCT clauses.
src/test/java/fr/inria/corese/core/next/query/impl/sparql/bridge/CoreseAstQueryBuilderAskTest.java Updates tests to expect UnsupportedQueryFeatureException for unsupported ASK clauses.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@remiceres
remiceres force-pushed the feature/487-unsupported-query-feature-exception branch from 13516d7 to 47988d4 Compare July 16, 2026 08:03
@github-actions

Copy link
Copy Markdown
Overall Project 51.05% -0.02% 🍏
Files changed 38.54%

File Coverage
WhereCompiler.java 100% 🍏
CoreseAstQueryBuilder.java 90.41% -4.05%
UnsupportedQueryFeatureException.java 44.44% -55.56%
SparqlAstToExpression.java 26.97% -1.83%

@abdessamad-abdoun
abdessamad-abdoun merged commit 1ccdc24 into feature/corese-next Jul 16, 2026
2 checks passed
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.

3 participants