Class RuntimeFilterRouter

java.lang.Object
org.apache.drill.exec.work.filter.RuntimeFilterRouter

public class RuntimeFilterRouter extends Object
This class manages the RuntimeFilter routing information of the pushed down join predicate of the partitioned exchange HashJoin. The working flow of the RuntimeFilter has two kinds: Broadcast case and Partitioned case. The HashJoinRecordBatch is responsible to generate the RuntimeFilter. To Partitioned case: The generated RuntimeFilter will be sent to the Foreman node. The Foreman node receives the RuntimeFilter async, broadcasts them to the Scan nodes's MinorFragment. The RuntimeFilterRecordBatch which is downstream to the Scan node will aggregate all the received RuntimeFilter and will leverage it to filter out the scanned rows to generate the SV2. To Broadcast case: The generated RuntimeFilter will be sent to Scan node's RuntimeFilterRecordBatch directly. The working of the RuntimeFilterRecordBath is the same as the Partitioned one.
  • Constructor Details

    • RuntimeFilterRouter

      public RuntimeFilterRouter(QueryWorkUnit workUnit, DrillbitContext drillbitContext)
      This class maintains context for the runtime join push down's filter management. It does a traversal of the physical operators by leveraging the root wrapper which indirectly holds the global PhysicalOperator tree and contains the minor fragment endpoints.
      Parameters:
      workUnit -
      drillbitContext -
  • Method Details

    • collectRuntimeFilterParallelAndControlInfo

      public void collectRuntimeFilterParallelAndControlInfo()
      This method is to collect the parallel information of the RuntimetimeFilters. Then it generates a RuntimeFilter routing map to record the relationship between the RuntimeFilter producers and consumers.
    • waitForComplete

      public void waitForComplete()
    • register

      public void register(RuntimeFilterWritable srcRuntimeFilterWritable)
      This method is passively invoked by receiving a runtime filter from the network
      Parameters:
      srcRuntimeFilterWritable -