org.eclipse.rdf4j.federated.optimizer

## Class UnionOptimizer

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor<OptimizationException>
  - - org.eclipse.rdf4j.federated.optimizer.UnionOptimizer

- All Implemented Interfaces:
    FedXOptimizer, QueryModelVisitor<OptimizationException>

      public class UnionOptimizer
      extends AbstractQueryModelVisitor<OptimizationException>
      implements FedXOptimizer

  Optimizer to flatten the UNION operations.
  Author:
    Andreas Schwarte

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected QueryInfo` | `queryInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnionOptimizer(QueryInfo queryInfo)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `handleUnionArgs(Union union, List<TupleExpr> args)` Add the union arguments to the args list, includes a recursion step for nested unions.
    `void` | `meet(Union union)`
    `void` | `optimize(TupleExpr tupleExpr)` Optimize the provided tuple expression

    - ### Methods inherited from class org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor

      `meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetNode, meetOther, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUpdateExpr`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### queryInfo

          protected final QueryInfo queryInfo

  - ### Constructor Detail

    - #### UnionOptimizer

          public UnionOptimizer(QueryInfo queryInfo)

  - ### Method Detail

    - #### optimize

          public void optimize(TupleExpr tupleExpr)

      Description copied from interface: `FedXOptimizer`
      Optimize the provided tuple expression
      Specified by:
        `optimize` in interface `FedXOptimizer`

    - #### meet

          public void meet(Union union)

      Specified by:
        `meet` in interface `QueryModelVisitor<OptimizationException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<OptimizationException>`

    - #### handleUnionArgs

          protected void handleUnionArgs(Union union,
                                         List<TupleExpr> args)

      Add the union arguments to the args list, includes a recursion step for nested unions.
      Parameters:
        `union` -
        `args` -

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.