Class BaseForExecOps

java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
All Implemented Interfaces:
StatsProvider, ExecutableOperator
Direct Known Subclasses:
BinaryExecutableOpBase, NaryExecutableOpBase, NullaryExecutableOpBase, UnaryExecutableOpBase

public abstract class BaseForExecOps extends Object implements ExecutableOperator
Top-level base class for all implementations of ExecutableOperator. This base class handles the collection of exceptions that may occur during the execution of the algorithm implemented by an executable operator, and it stores the QueryPlanningInfo (if any).
  • Field Details

    • qpInfo

      protected final QueryPlanningInfo qpInfo
      May be null.
    • collectExceptions

      protected final boolean collectExceptions
      If true, then the subclasses are expected to collect exceptions (by calling recordExceptionCaughtDuringExecution(Exception)); otherwise, they are expected to throw the exceptions immediately.
    • mayReduce

      protected final boolean mayReduce
      If true, then the executable operator is permitted (and encouraged) to reduce duplicate solution mappings as part of its execution; otherwise, the operator must preserve duplicates.
  • Constructor Details

    • BaseForExecOps

      public BaseForExecOps(boolean mayReduce, boolean collectExceptions, QueryPlanningInfo qpInfo)
      Parameters:
      collectExceptions - - if true, then the subclasses are expected to collect exceptions (by calling recordExceptionCaughtDuringExecution(Exception)); otherwise, they are expected to throw the exceptions immediately
      qpInfo - - may be null
  • Method Details

    • getQueryPlanningInfo

      public QueryPlanningInfo getQueryPlanningInfo()
      Description copied from interface: ExecutableOperator
      Returns the QueryPlanningInfo object that was populated for a physical plan whose root operator was the physical operator for which this executable operator was created.
      Specified by:
      getQueryPlanningInfo in interface ExecutableOperator
      Returns:
      the QueryPlanningInfo object or null.
    • getExceptionsCaughtDuringExecution

      public List<Exception> getExceptionsCaughtDuringExecution()
      Description copied from interface: ExecutableOperator
      Returns exceptions that were caught and collected during the execution of this operator (if any). If no exceptions were caught (which should be the normal case), then this function returns an empty list.
      Specified by:
      getExceptionsCaughtDuringExecution in interface ExecutableOperator
    • mayReduce

      public boolean mayReduce()
      Description copied from interface: ExecutableOperator
      Indicates whether this executable operator is permitted (and potentially encouraged) to reduce duplicate solution mappings as part of its execution.

      If this method returns true, the operator may remove duplicate solution mappings if it has the capability to do so. If it returns false, the operator must preserve duplicates, even if it would otherwise be able to eliminate them.

      Specified by:
      mayReduce in interface ExecutableOperator
      Returns:
      true if the operator may reduce duplicates; false otherwise.
    • recordExceptionCaughtDuringExecution

      protected void recordExceptionCaughtDuringExecution(Exception e)