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

Add query clause for outer joins #436

Closed
jclark opened this issue Feb 26, 2020 · 1 comment
Closed

Add query clause for outer joins #436

jclark opened this issue Feb 26, 2020 · 1 comment
Assignees
Labels
enhancement Enhancement to language design implementation/inprogress Implementation inprogress lang Relates to the Ballerina language specification

Comments

@jclark
Copy link
Collaborator

jclark commented Feb 26, 2020

This support left outer joins.

intermediate-clause :=
   ...
   | outer-join-clause
outer-join-clause :=
   "outer" "join" nullable-binding-pattern
    "in" expression join-condition
nullable-binding-pattern := "var" binding-pattern

The type of every variable bound in binding-pattern will be T?, where T is what it would be normal. When an input frame has no matching entry in the hash table, a frame is emitted in which all the variables occurring in the nullable-binding-pattern are bound to ().

Open points:

  • from a Ballerina perspective, join? might be a nicer syntax than outer join.

See also #435

@jclark jclark added enhancement Enhancement to language design lang Relates to the Ballerina language specification labels Feb 26, 2020
@jclark jclark added this to the 2020R2 milestone Feb 26, 2020
@jclark jclark self-assigned this Feb 26, 2020
@jclark
Copy link
Collaborator Author

jclark commented Mar 5, 2020

Relates to #445

@jclark jclark added this to the Swan Lake August preview milestone Aug 6, 2020
@jclark jclark closed this as completed in 5c8c68e Sep 12, 2020
@jclark jclark removed the status/pending Design is agreed and waiting to be added label Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to language design implementation/inprogress Implementation inprogress lang Relates to the Ballerina language specification
Projects
None yet
Development

No branches or pull requests

2 participants