Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: joins should support both equality and ON condition #12028

Closed
RaduBerinde opened this issue Dec 5, 2016 · 0 comments
Closed

sql: joins should support both equality and ON condition #12028

RaduBerinde opened this issue Dec 5, 2016 · 0 comments
Assignees

Comments

@RaduBerinde
Copy link
Member

Right now for JOINs we support three joinPredicates:

  • onPrediate: arbitrary ON condition [quadratic]
  • crossPredicate : no ON condition (equivalent to onPredicate with always true condition).
  • equalityPredicate: equality on pairs of columns condition [linear]

In general, we will need to support both a set of equality columns AND an additional ON condition (e.g. for cases like ON t1.a = t2.a AND t1.x < 2*t2.y)

In light of this, I think that having these separate types is overkill. There should be a single predicate that has an (optional) set of paired "equality" columns and an (optional) ON condition.

CC @knz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants