LiUSemWeb / HeFQUIN

HeFQUIN is a query federation engine for heterogeneous federations of graph data sources, including federations of knowledge graphs.
https://liusemweb.github.io/HeFQUIN/
Apache License 2.0
19 stars 2 forks source link

Integrate VALUES or FILTER bind join operator #373

Closed AdrianaConcha closed 1 week ago

hartig commented 2 weeks ago

This looks good now. The next step is to adapt the code that converts a given logical plan into a physical one.

This conversion is implemented primarily in the class PhysicalPlanFactory. This class contains a function called createPlanWithBindJoinVALUES and you need to add another such a function called createPlanWithBindJoinVALUESorFILTER.

Moreover, while the aforementioned new function is for cases in which the engine wants to explicitly pick the new operator, there is also a default choice of a physical operator for every logical operator. For all tpAdd, bgpAdd, and gpAdd operators with SPARQL endpoints, the default is currently the PhysicalOpBindJoinWithFILTER. That should be changed such that the new default is the new operator, for which you have to go into the class called LogicalToPhysicalOpConverter. The methods of this class implement the mapping from the logical operators to their respective default physical ones. You need to change the three methods that are for LogicalOpTPAdd, LogicalOpBGPAdd, and LogicalOpGPAdd, respectively. In each of these three methods, you need to change the case for SPARQL endpoints.

hartig commented 1 week ago

I have implemented the change (see commit https://github.com/LiUSemWeb/HeFQUIN/pull/373/commits/e6aa54fdc604a618cfa24f29134498f6cc7f6bd1).

I will merge this PR now because I pushed some other changes to the main branch yesterday and, due to these changes, merging this PR will result in a compile error. I want to fix this error before you continue.

hartig commented 1 week ago

Okay, compile error fixed. Now, after switching your local clone back to the main branch and doing git pull, you can compile the project in a terminal (mvn clean package) and then run the following command.

bin/hefquin --federationDescription=ExampleFederation.ttl --query=ExampleQuery.rq --skipExecution --printLogicalPlan --printPhysicalPlan

This should print the logical plan and the physical plan for the example query (without attempting to execute the query). In the physical plan, you can see that your new operator is used now :-)

I just realized that this was the last task for now. If I have something similar in the future, I will let you know.