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

Add result aggregation for query templates #283

Open
wants to merge 35 commits into
base: develop
Choose a base branch
from

Conversation

nck-mlcnv
Copy link
Contributor

@nck-mlcnv nck-mlcnv commented Sep 26, 2024

The new default behaviour is, that each result from the instances of a query template will be counted as the result of the query template. This is done by forcing the query instances to use the id of the query template in the results.
The query templates are considered as queries as well, but they won't be executed.

The ids of those queries that won't be presented in the results (instance queries if individualResults is turned on, query templates otherwise) will be shifted to the right, outside of the range of the number of queries whose results will be presented.

The serialization of the query instaces needed to be changed as well, so that the query instances can be mapped back to their
templates.

The query handler also needs to differentiate between the number of executable queries and the number of queries, that
will be presented in the results, otherwise, too few queries might be executed.

Todo:

  • Tests
  • Documentation

@nck-mlcnv
Copy link
Contributor Author

Also, the result model probably needs to be changed, so that it includes the relation between query templates and their instances.

@nck-mlcnv nck-mlcnv self-assigned this Sep 26, 2024
@nck-mlcnv nck-mlcnv marked this pull request as ready for review September 27, 2024 10:05
@nck-mlcnv nck-mlcnv changed the base branch from feature/update-queries to develop September 27, 2024 10:06
@bigerl bigerl linked an issue Sep 27, 2024 that may be closed by this pull request
# Conflicts:
#	src/main/java/org/aksw/iguana/cc/query/QueryData.java
#	src/main/java/org/aksw/iguana/cc/query/handler/QueryHandler.java
#	src/main/java/org/aksw/iguana/cc/query/list/QueryList.java
#	src/test/java/org/aksw/iguana/cc/query/QueryDataTest.java
Copy link
Member

@bigerl bigerl left a comment

Choose a reason for hiding this comment

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

Thx for the PR. The changes to introduce the aggregation currently seem quite complex. See my comments for suggestions on how the code could be untangled a bit.

graalvm/suite.yml Outdated Show resolved Hide resolved
src/main/java/org/aksw/iguana/cc/query/QueryData.java Outdated Show resolved Hide resolved
@bigerl bigerl added this to the 5.0 milestone Oct 30, 2024
@bigerl bigerl removed this from the 5.0 milestone Oct 30, 2024
@nck-mlcnv
Copy link
Contributor Author

The version check test seems to be broken, I have to fix it soon. Also I haven't extracted the header writing part to a separate file yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Result aggregation for Pattern Queries
2 participants