Documentation / OPT-009
Issue boardGitLab source
OPT-009 Planned contract

Multi-table joins and join-order optimization

Extend two-table binding; push selective filters early; compare join plans using equal results. Enable grader flag(s): mj mjo. This is a stretch backlog item, not a commitment.

Contract

Field Value
Specification OPT-009
Module optional
Scope Optional stretch — requires explicit selection
Milestone M3, due 2026-12-30
Owner role Shared — choose one MR owner
Implementation Planned; scaffold only
Contract review Team review required before implementation

Open GitLab issue

Interface

Optional AST + executor/codec extension

These are proposed C++ design contracts, not an already implemented API. Shared types and ownership define the intended module boundaries.

Dependencies

Acceptance checklist

  • Agree complete syntax and contract before implementing
  • Pass the linked optional case(s) and rerun required suite
  • Record actual optional raw score and updated documentation

Setup data

Run this in a fresh isolated data directory before the example. Setup commands emit their own results; the expected block below covers only the listed input.

CREATE DATABASE demo;
USE demo;
CREATE TABLE a (id INT);
CREATE TABLE b (id INT);
CREATE TABLE c (id INT);
INSERT INTO a VALUES (1);
INSERT INTO b VALUES (1);
INSERT INTO c VALUES (1);

Input

SELECT a.id, b.id, c.id FROM a, b, c WHERE a.id = b.id AND b.id = c.id;

Expected output

a.id,b.id,c.id
1,1,1
@

Where no ORDER BY appears, row order is not guaranteed. Error message text is illustrative; required diagnostic keywords and result framing are binding.

Verification

Completion rule

Link this spec and its GitLab issue in an MR into develop. Include relevant Linux evidence, obtain the other teammate’s review, merge, delete the feature branch, and close the issue. A page describes intended behavior; the GitLab issue and merged code determine completion.

DBS 005 · Specification v1 · Team review required for proposed interfaces.
Engine behavior is planned; implementation progress lives in GitLab.