Closed AdrianaConcha closed 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.
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.
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 calledcreatePlanWithBindJoinVALUES
and you need to add another such a function calledcreatePlanWithBindJoinVALUESorFILTER
.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 calledLogicalToPhysicalOpConverter
. 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 forLogicalOpTPAdd
,LogicalOpBGPAdd
, andLogicalOpGPAdd
, respectively. In each of these three methods, you need to change the case for SPARQL endpoints.