diff --git a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/BaseForExecOpBindJoinWithRequestOps.java b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/BaseForExecOpBindJoinWithRequestOps.java index 435a28ca3..f1b2d4459 100644 --- a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/BaseForExecOpBindJoinWithRequestOps.java +++ b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/BaseForExecOpBindJoinWithRequestOps.java @@ -27,7 +27,7 @@ * * The implementation is generic in the sense that it works with any type of * request operator. Each concrete implementation that extends this base class - * needs to implement the {@link #createExecutableRequestOperator(Iterable)} + * needs to implement the {@link #createExecutableReqOp(Iterable)} * function to create the request operators with the types of requests that * are specific to that concrete implementation. * @@ -159,7 +159,7 @@ protected void _processWithoutSplittingInputFirst( final List j final IntermediateResultElementSink sink, final ExecutionContext execCxt ) throws ExecOpExecutionException { - final NullaryExecutableOp reqOp = createExecutableRequestOperator(joinableInputSMs); + final NullaryExecutableOp reqOp = createExecutableReqOp(joinableInputSMs); if ( reqOp != null ) { numberOfRequestOpsUsed++; @@ -214,10 +214,14 @@ protected boolean reduceRequestBlockSize() { } /** - * The returned operator should be created such that it throws exceptions - * instead of collecting them. + * Implementations of this function should create an executable operator + * that can perform a bind join request in which the query of this bind + * join operator is combined with the given solution mappings. + * + * The operator created by this function should throws exceptions instead + * of collecting them. */ - protected abstract NullaryExecutableOp createExecutableRequestOperator( Iterable solMaps ); + protected abstract NullaryExecutableOp createExecutableReqOp( Iterable solMaps ); /** * Splits the given collection of solution mappings into two such that the diff --git a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinBRTPF.java b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinBRTPF.java index 65e69423f..e983e93de 100644 --- a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinBRTPF.java +++ b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinBRTPF.java @@ -47,7 +47,7 @@ public ExecOpBindJoinBRTPF( final TriplePattern tp, } @Override - protected NullaryExecutableOp createExecutableRequestOperator( final Iterable inputSolMaps ) { + protected NullaryExecutableOp createExecutableReqOp( final Iterable inputSolMaps ) { final Set restrictedSMs = restrictSolMaps(inputSolMaps, varsInPatternForFM); if ( restrictedSMs == null ) { diff --git a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithFILTER.java b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithFILTER.java index e0fa2c2b6..1c9b162da 100644 --- a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithFILTER.java +++ b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithFILTER.java @@ -16,9 +16,7 @@ import se.liu.ida.hefquin.base.data.SolutionMapping; import se.liu.ida.hefquin.base.data.utils.SolutionMappingUtils; -import se.liu.ida.hefquin.base.query.BGP; import se.liu.ida.hefquin.base.query.SPARQLGraphPattern; -import se.liu.ida.hefquin.base.query.TriplePattern; import se.liu.ida.hefquin.base.query.impl.GenericSPARQLGraphPatternImpl2; import se.liu.ida.hefquin.base.query.impl.QueryPatternUtils; import se.liu.ida.hefquin.engine.federation.SPARQLEndpoint; @@ -48,20 +46,6 @@ */ public class ExecOpBindJoinSPARQLwithFILTER extends BaseForExecOpBindJoinSPARQL { - public ExecOpBindJoinSPARQLwithFILTER( final TriplePattern query, - final SPARQLEndpoint fm, - final boolean useOuterJoinSemantics, - final boolean collectExceptions ) { - super(query, fm, useOuterJoinSemantics, collectExceptions); - } - - public ExecOpBindJoinSPARQLwithFILTER( final BGP query, - final SPARQLEndpoint fm, - final boolean useOuterJoinSemantics, - final boolean collectExceptions ) { - super(query, fm, useOuterJoinSemantics, collectExceptions); - } - public ExecOpBindJoinSPARQLwithFILTER( final SPARQLGraphPattern query, final SPARQLEndpoint fm, final boolean useOuterJoinSemantics, @@ -70,7 +54,7 @@ public ExecOpBindJoinSPARQLwithFILTER( final SPARQLGraphPattern query, } @Override - protected NullaryExecutableOp createExecutableRequestOperator( final Iterable solMaps ) { + protected NullaryExecutableOp createExecutableReqOp( final Iterable solMaps ) { final Op op = createFilter(solMaps); if ( op == null ) { return null; diff --git a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithUNION.java b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithUNION.java index 652739877..d1a705893 100644 --- a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithUNION.java +++ b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithUNION.java @@ -16,9 +16,7 @@ import se.liu.ida.hefquin.base.data.SolutionMapping; import se.liu.ida.hefquin.base.data.utils.SolutionMappingUtils; -import se.liu.ida.hefquin.base.query.BGP; import se.liu.ida.hefquin.base.query.SPARQLGraphPattern; -import se.liu.ida.hefquin.base.query.TriplePattern; import se.liu.ida.hefquin.base.query.impl.GenericSPARQLGraphPatternImpl2; import se.liu.ida.hefquin.base.query.impl.QueryPatternUtils; import se.liu.ida.hefquin.engine.federation.SPARQLEndpoint; @@ -27,27 +25,22 @@ import se.liu.ida.hefquin.engine.queryplan.executable.NullaryExecutableOp; /** - * Implementation of (a batching version of) the bind join algorithm that uses UNION. + * Implementation of (a batching version of) the bind join algorithm + * that uses UNION clauses with FILTERs inside. * * The current algorithm should to be changed. * See: https://github.com/LiUSemWeb/HeFQUIN/issues/344 */ public class ExecOpBindJoinSPARQLwithUNION extends BaseForExecOpBindJoinSPARQL { - public ExecOpBindJoinSPARQLwithUNION( final TriplePattern query, final SPARQLEndpoint fm, final boolean collectExceptions ) { - super(query, fm, false, collectExceptions); - } - - public ExecOpBindJoinSPARQLwithUNION( final BGP query, final SPARQLEndpoint fm, final boolean collectExceptions ) { - super(query, fm, false, collectExceptions); - } - - public ExecOpBindJoinSPARQLwithUNION( final SPARQLGraphPattern query, final SPARQLEndpoint fm, final boolean collectExceptions ) { + public ExecOpBindJoinSPARQLwithUNION( final SPARQLGraphPattern query, + final SPARQLEndpoint fm, + final boolean collectExceptions ) { super(query, fm, false, collectExceptions); } @Override - protected NullaryExecutableOp createExecutableRequestOperator( final Iterable solMaps ) { + protected NullaryExecutableOp createExecutableReqOp( final Iterable solMaps ) { final Op op = createUnion(solMaps); if ( op == null ) { return null; diff --git a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithVALUES.java b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithVALUES.java index bb9a11469..5fecdfde8 100644 --- a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithVALUES.java +++ b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithVALUES.java @@ -15,9 +15,7 @@ import se.liu.ida.hefquin.base.data.SolutionMapping; import se.liu.ida.hefquin.base.data.utils.SolutionMappingUtils; -import se.liu.ida.hefquin.base.query.BGP; import se.liu.ida.hefquin.base.query.SPARQLGraphPattern; -import se.liu.ida.hefquin.base.query.TriplePattern; import se.liu.ida.hefquin.base.query.impl.GenericSPARQLGraphPatternImpl2; import se.liu.ida.hefquin.base.query.impl.QueryPatternUtils; import se.liu.ida.hefquin.engine.federation.SPARQLEndpoint; @@ -47,20 +45,6 @@ */ public class ExecOpBindJoinSPARQLwithVALUES extends BaseForExecOpBindJoinSPARQL { - public ExecOpBindJoinSPARQLwithVALUES( final TriplePattern query, - final SPARQLEndpoint fm, - final boolean useOuterJoinSemantics, - final boolean collectExceptions ) { - super(query, fm, useOuterJoinSemantics, collectExceptions); - } - - public ExecOpBindJoinSPARQLwithVALUES( final BGP query, - final SPARQLEndpoint fm, - final boolean useOuterJoinSemantics, - final boolean collectExceptions ) { - super(query, fm, useOuterJoinSemantics, collectExceptions); - } - public ExecOpBindJoinSPARQLwithVALUES( final SPARQLGraphPattern query, final SPARQLEndpoint fm, final boolean useOuterJoinSemantics, @@ -69,7 +53,7 @@ public ExecOpBindJoinSPARQLwithVALUES( final SPARQLGraphPattern query, } @Override - protected NullaryExecutableOp createExecutableRequestOperator( final Iterable solMaps ) { + protected NullaryExecutableOp createExecutableReqOp( final Iterable solMaps ) { final Set bindings = new HashSet<>(); final Set joinVars = new HashSet<>(); diff --git a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithVALUESorFILTER.java b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithVALUESorFILTER.java index 96aa14c82..9201c9f91 100644 --- a/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithVALUESorFILTER.java +++ b/hefquin-engine/src/main/java/se/liu/ida/hefquin/engine/queryplan/executable/impl/ops/ExecOpBindJoinSPARQLwithVALUESorFILTER.java @@ -2,9 +2,7 @@ import java.util.Collections; import java.util.List; -import se.liu.ida.hefquin.base.query.BGP; import se.liu.ida.hefquin.base.query.SPARQLGraphPattern; -import se.liu.ida.hefquin.base.query.TriplePattern; import se.liu.ida.hefquin.engine.federation.SPARQLEndpoint; import se.liu.ida.hefquin.engine.queryplan.executable.ExecOpExecutionException; import se.liu.ida.hefquin.engine.queryplan.executable.IntermediateResultBlock; @@ -28,22 +26,6 @@ public class ExecOpBindJoinSPARQLwithVALUESorFILTER extends BaseForExecOpBindJoi // will be initialized when processing the first input block of solution mappings protected BaseForExecOpBindJoinSPARQL currentInstance = null; - public ExecOpBindJoinSPARQLwithVALUESorFILTER( final TriplePattern query, - final SPARQLEndpoint fm, - final boolean useOuterJoinSemantics, - final boolean collectExceptions ) { - super(query, fm, collectExceptions); - this.useOuterJoinSemantics = useOuterJoinSemantics; - } - - public ExecOpBindJoinSPARQLwithVALUESorFILTER( final BGP query, - final SPARQLEndpoint fm, - final boolean useOuterJoinSemantics, - final boolean collectExceptions ) { - super(query, fm, collectExceptions); - this.useOuterJoinSemantics = useOuterJoinSemantics; - } - public ExecOpBindJoinSPARQLwithVALUESorFILTER( final SPARQLGraphPattern query, final SPARQLEndpoint fm, final boolean useOuterJoinSemantics,