Description
Implement the generic DISTANCE expander, which produces an exp.Case AST, register it, flip GIQL_EXPAND on GIQLDistance, and delete giqldistance_sql. DISTANCE is the simplest operator — a single CASE expression — so it serves as the proof-of-concept that validates the expander protocol, registry dispatch, and the cross-target result-oracle workflow before the harder operators.
Motivation
De-risk the architecture on the smallest possible surface, surfacing any protocol or oracle gaps while the blast radius is minimal.
Expected Outcome
DISTANCE transpiles through the registry to standard AST; results are identical across DuckDB and DataFusion and unchanged from the legacy emitter; giqldistance_sql is removed.
Description
Implement the generic DISTANCE expander, which produces an
exp.CaseAST, register it, flipGIQL_EXPANDonGIQLDistance, and deletegiqldistance_sql. DISTANCE is the simplest operator — a single CASE expression — so it serves as the proof-of-concept that validates the expander protocol, registry dispatch, and the cross-target result-oracle workflow before the harder operators.Motivation
De-risk the architecture on the smallest possible surface, surfacing any protocol or oracle gaps while the blast radius is minimal.
Expected Outcome
DISTANCE transpiles through the registry to standard AST; results are identical across DuckDB and DataFusion and unchanged from the legacy emitter;
giqldistance_sqlis removed.