Skip to content
New issue

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

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

Already on GitHub? # to your account

Problem with the no-service mode #506

Closed
luigi-asprino opened this issue Oct 11, 2024 · 1 comment
Closed

Problem with the no-service mode #506

luigi-asprino opened this issue Oct 11, 2024 · 1 comment
Labels
Bug Something isn't working
Milestone

Comments

@luigi-asprino
Copy link
Member

The no-service mode introduced in #150 works for queries that have BGP with possibly a magic property (i.e. fx:anySlot).
If you add an optional clause this will work as intended.
This is because the FXOpExecutor only overrides execute(OpBGP), execute(OpService), execute(OpPropFunc).
Therefore it only reacts to these Ops.
Also, when the engine evaluates the OPTIONAL clause, the execution context changes, and even if we've already processed the OpBGP and triplificated the source, the execution context of the OPTIONAL clause does not contain the dataset generated by the triplifier.
We only have this problem in no-service mode, because when the service clause is evaluated, each sub-operation has the triplificated dataset in its context.
To avoid this problem we can override OpExecutor.exec(Op, QueryIterator) which is the root method for evaluating the query.
To enable no service mode, we can add a flag to the execution context.
This flag is read by FXOpExecutor.exec() and if it is true, it performs the triplication as expected and adds the dataset to the execution context.
The execution can then continue with the standard Jena execution.
The OpService that is then evaluated inherits the context and thus the triplificated dataset.
Therefore, the OpService in service mode must be evaluated as a standard OpService (it makes little sense to evaluate the fx service in no service mode).

@luigi-asprino luigi-asprino added the Bug Something isn't working label Oct 11, 2024
@luigi-asprino luigi-asprino added this to the v1.0.0 milestone Oct 11, 2024
@luigi-asprino
Copy link
Member Author

I reopen it just to fix the CLI help

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant