Skip to content

Support INNER JOIN USING() syntax #3939

@sergei-pustovykh

Description

@sergei-pustovykh

Recently we introduced support of the INNER JOIN ON syntax. However, INNER JOIN has a special case INNER JOIN USING(), which we also need to implement.
The USING clause is a shorthand way to specify the join condition when both tables share a column with the exact same name that you want to join on. It's an alternative to the more verbose ON clause, but only applicable under this specific condition.
The key characteristic of USING is that it deduplicates the joining column(s) in the output. When you use SELECT * with INNER JOIN ... USING, the common column specified in the USING clause will appear only once in the result set. But at the same time you can directly access each column: SELECT a.c1, b.c1 FROM a INNER JOIN b USING(c1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    relationalissues related to relational FDB

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions