Skip to content

sql: introduce a new predicate structure to replace usingPredicate #10630

@knz

Description

@knz

There needs to be a new join predicate structure to replace usingPredicate that describes a join using an equality relation between columns on the left and right. The new predicate, let's call this the equalityPredicate extends usingPredicate by allowing the names of the join columns on the left and right to differ.

Once this predicate exists, the following needs to happen:

  1. the constructor for USING must be changed to use equalityPredicate
  2. after sql: add hash join algorithm for USING/NATURAL predicates #10618 is merged, the hash join must be used for equalityPredicate as well.

for the purpose of EXPLAIN we can then describe the equalityPredicate using the following syntax: ON EQUALS(left columns..., right columns...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-pgcompatSemantic compatibility with PostgreSQLE-easyEasy issue to tackle, requires little or no CockroachDB experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions