Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

No results on re-execution of a TREE query using the same blank node has a object and a subject #102

Closed
constraintAutomaton opened this issue Mar 23, 2023 · 8 comments

Comments

@constraintAutomaton
Copy link
Member

I realize that when I'm running a query that has a variable that will be a blank node and that variable is reused as a subject than when I rerun the query the engine will produce no result. For illustration let's consider this query

PREFIX tree: <https://w3id.org/tree#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT * WHERE {
  ?node tree:relation ?relation .
  ?relation tree:node ?nextNode .
}

where ?relation will be a blank node.

if instead I'm running this query

PREFIX tree: <https://w3id.org/tree#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT * WHERE {
  ?relation tree:node ?nextNode .
}

or that query

PREFIX tree: <https://w3id.org/tree#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT * WHERE {
  ?node tree:relation ?relation .
}

I'm not having this problem. Which make me think that the reused of the blank node might be the problem.

Here a link of an example using the engine

@rubensworks rubensworks transferred this issue from comunica/jQuery-Widget.js Mar 27, 2023
@rubensworks rubensworks changed the title The engine doesn't give results when re execution a query using the same blank node has a object and a subject The engine doesn't give results when re execution a TREE query using the same blank node has a object and a subject Mar 27, 2023
@rubensworks
Copy link
Member

Query re-execution seems to work fine with regular link traversal AFAIK.
So this might be a tree actor-specific bug?

@rubensworks rubensworks changed the title The engine doesn't give results when re execution a TREE query using the same blank node has a object and a subject No results on re-execution of a TREE query using the same blank node has a object and a subject Mar 27, 2023
@constraintAutomaton
Copy link
Member Author

constraintAutomaton commented Mar 27, 2023

Query re-execution seems to work fine with regular link traversal AFAIK. So this might be a tree actor-specific bug?

At least on my end it does not. I has to be noted that the execution must have ended, for the bug to manifest.

example query with default config

@rubensworks
Copy link
Member

I see, so it's a higher-level problem indeed.

@rubensworks rubensworks added this to Triage in Maintenance Mar 27, 2023
@rubensworks
Copy link
Member

I just realized that this may be the same problem as discovered in comunica/comunica#1180 (comment).
But this will require some work to confirm.

rubensworks added a commit to comunica/comunica that referenced this issue Apr 6, 2023
This caused problems related to dataset-level cardinalities
that were found in the initial source being overridden without
proper accumulation with exact cardinalities from later sources

Closes #1156
Closes #1180

May be related to comunica/comunica-feature-link-traversal#102
rubensworks added a commit to comunica/comunica that referenced this issue Apr 12, 2023
This caused problems related to dataset-level cardinalities
that were found in the initial source being overridden without
proper accumulation with exact cardinalities from later sources

Closes #1156
Closes #1180

May be related to comunica/comunica-feature-link-traversal#102
rubensworks added a commit to comunica/comunica that referenced this issue May 22, 2023
This refactors internal metadata handling so that it can be incrementally updated.

Metadata objects now have a `state` field, which represents their validation state,
which can be invalidated, and be listened to.
This allows actors to listen to metadata invalidations and act upon changes.

This commit also adds a metadata accumulation bus that
abstracts the logic for merging metadata from multiple sources that
existed before in the federated actor.
This will enable this logic to be used in other places, and for other
actors to manage how metadata is merged.

Closes #1156
Closes #1180

May be related to comunica/comunica-feature-link-traversal#102
@rubensworks
Copy link
Member

Ok, the changes in Comunica indeed seem to have solved this problem as well 🎉

Maintenance automation moved this from Triage to Done May 25, 2023
@constraintAutomaton
Copy link
Member Author

Sadly, the problem still manifests itself when we rerun the query on the demo engine.

@rubensworks rubensworks reopened this May 25, 2023
Maintenance automation moved this from Done to To Do (prio:medium) May 25, 2023
@rubensworks
Copy link
Member

@constraintAutomaton Could you check again with the new code in comunica v3?

@rubensworks rubensworks moved this from To Do (prio:medium) to On hold (awaiting input) in Maintenance Apr 19, 2024
@constraintAutomaton
Copy link
Member Author

@constraintAutomaton Could you check again with the new code in comunica v3?

Yes it seems to be working now!

Maintenance automation moved this from On hold (awaiting input) to Done Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Maintenance
  
Done
Development

No branches or pull requests

2 participants