[NEXT][CLEANUP] Clarify query packages outside KGRAM#499
Merged
abdessamad-abdoun merged 4 commits intoJul 20, 2026
Conversation
Test Results 438 files 438 suites 21s ⏱️ Results for commit ddc6585. |
abdessamad-abdoun
self-requested a review
July 17, 2026 14:53
abdessamad-abdoun
approved these changes
Jul 20, 2026
abdessamad-abdoun
marked this pull request as ready for review
July 20, 2026 06:27
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Part of #473.
The Corese-next query pipeline had accumulated duplicated parser contracts, implementation classes under public API packages, ambiguous listener names, and inconsistent result serializer contracts.
This PR clarifies those boundaries before the public SPARQL request API is designed.
It is rebased on #492, so the public SPARQL
Datasettype remains owned by the query API.What changed
Parser ownership
QueryParser,QueryOptions, andAbstractQueryParserdefinitions.impl.parser.AbstractQueryParseran internal parser implementation detail.The parser and AST are pipeline internals. The future public SPARQL API should expose prepared queries and results rather than parsing infrastructure.
ANTLR listeners
SparqlListenertoSparqlListenerDispatcher.*Featureto*AstListener.Examples:
BgpFeature→BgpAstListenerSelectQueryFeature→SelectQueryAstListenerFilterFeature→FilterAstListenerClearRequestFeature→ClearUpdateAstListenerThese classes listen to ANTLR events and populate AST builders. Their previous names could incorrectly suggest that they implemented a complete SPARQL feature across parsing, bridging, and execution.
Result serialization
ResultFormatfromapi.base.iotoapi.io.IResultSerializerFactorytoResultSerializerFactory.DefaultResultSerializerFactory.createSerializer(...)withcreateTupleSerializer(...).createBooleanSerializer(...)returnBooleanResultSerializer.null.Examples:
JSONSerializer→JsonTupleResultSerializerJSONBooleanSerializer→JsonBooleanResultSerializerXMLSerializer→XmlTupleResultSerializerCSVSerializer→CsvTupleResultSerializerSerializer option and constant classes follow the same naming convention.
SPARQL JSON boolean result
ASK results are now serialized as JSON booleans:
{"boolean": true}instead of JSON strings:
{"boolean": "true"}This aligns the output with the SPARQL Query Results JSON format.
Package documentation
Added short
package-info.javafiles for the main architectural boundaries:Architectural result
The intended dependency direction is now:
Parser, AST, bridge, and execution wiring are not considered part of the future public SPARQL request API.
Out of scope
next.query.kgram.**StorageManagerredesignSparqlAstBuilder