You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(operators): RIGHT and FULL outer joins + qualified column resolution (issue 04)
NestedLoopJoinOperator previously rejected RIGHT and FULL joins at
runtime even though the parser and planner could represent them.
Hash join only supported INNER and LEFT. The parser/planner contract
silently exceeded the executor's reach -- queries that parsed and
planned cleanly failed at execution.
Fix:
- NestedLoopJoinOperator now executes RIGHT and FULL outer joins.
After the standard left-driven loop, walks the right side once
more and emits any unmatched right rows with NULL on the left
side. Tracks matched right rows with a parallel right_matched_
vector built during the outer scan.
- Resolves qualified column names (table.column, alias.column) in
the join condition. Adds split_qualified_name and
matches_table_qualifier helpers; previously qualified refs would
silently miss because the column resolver only matched bare
names.
Tests:
- tests/test_operators.cpp gets RightJoinIncludesUnmatchedRightRows
and FullJoinIncludesUnmatchedRowsFromBothSides plus parallel
cases for HashJoin (still nested-loop fallback for those today;
follow-up).
- tests/test_plan_executor.cpp adds end-to-end plan-tree coverage
for the new join shapes.
- tests/test_eval_integration.cpp gets a small case that exercises
qualified-name predicate resolution against the join evaluator.
- tests/test_classifier.cpp comment update to drop a stale "Tier 1
not implemented" remark.
- include/sql_parser/parser.h comment update for the same reason.
Verification:
- make test: 1208 passed, 37 skipped (live-backend), 0 failed.
0 commit comments