Skip to main content

Module hashjoin

Module hashjoin 

Source
Expand description

HashJoin bitmap-emission analysis.

Given the two children of a SqlPlan::Join, this module determines which side(s) qualify for bitmap-producer pushdown and returns a BitmapJoinHints struct. The converter layer (nodedb’s sql_plan_convert::scan) uses these hints to populate QueryOp::HashJoin::inline_left_bitmap and inline_right_bitmap with the appropriate PhysicalPlan sub-plans.

Selection policy (no cost model; no statistics required):

  • Left child qualifies → emit inline_left_bitmap hint.
  • Right child qualifies → emit inline_right_bitmap hint.
  • Both qualify → emit the side that is already a DocumentIndexLookup (already indexed), preferring left if both are the same shape.
  • Neither qualifies → both hints are None.

Structs§

BitmapJoinHints
Bitmap-pushdown hints for both sides of a join.

Functions§

analyze_join_sides
Analyze both join children and return bitmap-pushdown hints.