Class LeftJoinQueryEvaluationStep

java.lang.Object
org.eclipse.rdf4j.query.algebra.evaluation.impl.evaluationsteps.LeftJoinQueryEvaluationStep
All Implemented Interfaces:
QueryEvaluationStep

public final class LeftJoinQueryEvaluationStep extends Object implements QueryEvaluationStep
  • Constructor Details

  • Method Details

    • supply

      public static QueryEvaluationStep supply(EvaluationStrategy strategy, LeftJoin leftJoin, QueryEvaluationContext context)
    • evaluate

      public CloseableIteration<BindingSet> evaluate(BindingSet bindings)
      Specified by:
      evaluate in interface QueryEvaluationStep
    • determineRightEvaluationStep

      public static QueryEvaluationStep determineRightEvaluationStep(LeftJoin join, QueryEvaluationStep prepareRightArg, QueryValueEvaluationStep joinCondition, Set<String> scopeBindingNames)
      This function determines the way the right-hand side is evaluated. There are 3 options:

      1. No join condition:
      The right-hand side should just be joined with the left-hand side. No filtering is applied.

      2. The join condition can be fully evaluated by the left-hand side:

      SELECT * WHERE {
              ?dist a dcat:Distribution .
       ?dist dc:license ?license .
      
       OPTIONAL {
              ?a dcat:distribution ?dist.
      
           FILTER(?license = invalid input: '<'http://wiki.data.gouv.fr/wiki/Licence_Ouverte_/_Open_Licence>)
              }
      }
      
      In this case, pre-filtering can be applied. The right-hand side does not have to evaluated when the join condition evaluates to false.

      3. The join condition needs right-hand side evaluation:

      SELECT * WHERE {
       ?dist a dcat:Distribution .
      
              OPTIONAL {
              ?a dcat:distribution ?dist .
                      ?a dct:language $lang .
      
                      FILTER(?lang = eu-lang:ENG)
              }
      }
      
      In this case, the join condition can only be evaluated after the right-hand side is evaluated (post-filtering).