Problem
StandardJoin.validate() in sql/src/main/scala/app/softnetwork/elastic/sql/query/From.scala currently rejects all join types except InnerJoin and LeftJoin:
override def validate(): Either[String, Unit] = {
for {
_ <- joinType match {
case Some(InnerJoin | LeftJoin) => Right(())
case None => Right(()) // by default INNER JOIN
case _ => Left(s"Standard JOIN $this requires an INNER (default) or LEFT JOIN type")
}
...
} yield ()
}
This means RIGHT JOIN and FULL OUTER JOIN are rejected at parse time, even though the downstream engines (DuckDB in federation, Elasticsearch for single-cluster) could support them.
Impact
- Federation queries using
RIGHT JOIN or FULL OUTER JOIN fail with a parser error before reaching the query planner.
- Users must rewrite
RIGHT JOIN as LEFT JOIN with swapped table order, which is unintuitive.
Proposed Fix
Extend StandardJoin.validate() to accept RightJoin and FullJoin (at minimum for federation mode where DuckDB handles the join).
Context
Discovered during Story 3.6 (End-to-End Federation Query Path) adversarial review.
🤖 Generated with Claude Code
Problem
StandardJoin.validate()insql/src/main/scala/app/softnetwork/elastic/sql/query/From.scalacurrently rejects all join types exceptInnerJoinandLeftJoin:This means
RIGHT JOINandFULL OUTER JOINare rejected at parse time, even though the downstream engines (DuckDB in federation, Elasticsearch for single-cluster) could support them.Impact
RIGHT JOINorFULL OUTER JOINfail with a parser error before reaching the query planner.RIGHT JOINasLEFT JOINwith swapped table order, which is unintuitive.Proposed Fix
Extend
StandardJoin.validate()to acceptRightJoinandFullJoin(at minimum for federation mode where DuckDB handles the join).Context
Discovered during Story 3.6 (End-to-End Federation Query Path) adversarial review.
🤖 Generated with Claude Code