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

spannertest: Support for (HASH) JOIN in select statement #2462

Closed
jrmeinride opened this issue Jun 16, 2020 · 3 comments · Fixed by #2945
Closed

spannertest: Support for (HASH) JOIN in select statement #2462

jrmeinride opened this issue Jun 16, 2020 · 3 comments · Fixed by #2945
Assignees
Labels
api: spanner Issues related to the Spanner API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jrmeinride
Copy link

Is your feature request related to a problem? Please describe.
We have some functionality that uses more than one table in spanner. By using interleave the service is still fast and responsive. When adding unit tests we cannot test certain parts of our code, since there is no support for JOIN, or HASH JOIN in spannertest.

The type of query we would like to be able to run is something akin to this:

SELECT * 
FROM table1
LEFT OUTER HASH JOIN table2
	ON table1.id = table2.table1_id

Describe the solution you'd like
We would like spannertest to support LEFT OUTER HASH JOIN in SELECT statements.

Describe alternatives you've considered
The only viable option would be to set up a table for testing in one of our projects, but that can not be considered to be a unit test.

Additional context

@jrmeinride jrmeinride added the triage me I really want to be triaged. label Jun 16, 2020
@tbpg tbpg added api: spanner Issues related to the Spanner API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels Jun 16, 2020
@skuruppu
Copy link
Contributor

@jrmeinride another alternative could be to setup the unit tests against the Cloud Spanner Emulator.

In any case, I will assign this to @dsymonds to see if he's got the cycles to implement this support.

@skuruppu skuruppu assigned dsymonds and unassigned skuruppu Jun 18, 2020
@jrmeinride
Copy link
Author

@jrmeinride another alternative could be to setup the unit tests against the Cloud Spanner Emulator.

In any case, I will assign this to @dsymonds to see if he's got the cycles to implement this support.

Thank you! I will look into that.

@dsymonds
Copy link
Contributor

Starting to do some preliminary work on this in #2850.

gcf-merge-on-green bot pushed a commit that referenced this issue Sep 28, 2020
These are not properly documented, so this only attempts to support a
limited but widely used subset, which will be sufficient for more fully
supporting aliases and joins.

Updates #2462.
Updates #2463.
Updates #2850.
@dsymonds dsymonds added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Sep 30, 2020
dsymonds added a commit that referenced this issue Oct 1, 2020
This includes both the special case "HASH JOIN" syntax and the
"JOIN@{...}" syntax.

Initial work towards #2462.
dsymonds added a commit that referenced this issue Oct 1, 2020
)

This lays the groundwork for supporting joins, and this initial subset
is a very common form.

Fixes #2462.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants