-
Notifications
You must be signed in to change notification settings - Fork 322
Add support for cross lateral joins. #458
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 support for cross lateral joins. #458
Conversation
@wilkinson4 are you able to point this at your ecto PR branch? i think integration tests will fail for tds/mysql. maybe we can add it for those adapters too since it's a small change |
I also think we have to change I don't think cross lateral join uses |
3f486d2
to
1fe785c
Compare
@greg-rychlewski I am trying to point it at my ecto PR now, but I've never done that before so I'm still looking into that. Added the join_on case for postgres, but I think that cross lateral join is only supported by Postgres presently. Would that mean this change would require more work to make cross join lateral only available for Postgres Repo's? |
Oh so in your mix.exs you just do this: I'm pretty sure MySQL has cross lateral join as Unless Jose knows, maybe just ignore the |
Not too much. We could just raise a nice error like this in the |
Actually lateral join only works in MySQL from 8.0.14 and the CI is on 5.7 only. So I guess MySQL needs to ignore the integration test as well. I'll test it out on my local though to make sure it works on MySQL 8. |
@greg-rychlewski Temporarily changed the |
@wilkinson4 it looks like there are some failures. for the integration test I think it's because you need to use a subquery similar to the change you made in the unit test |
If you're able to, it's really easy to run the tests locally so you can make sure they're passing. For unit tests just do For integration tests do |
8969d2d
to
3a2c395
Compare
You're getting a bunch of weird errors that look unrelated to your change. It could be because your ecto branch is 182 commits behind master but your ecto_sql branch is up to date. Are you able to bring your ecto branch up to date? |
- Add error messages for cross lateral join in tds/myxql connections. - Fix broken postgres test.
3a2c395
to
c406abe
Compare
@greg-rychlewski Okay. Sorry about all the changes needed. I synced my ecto fork and rebased master onto my ecto PR branch so that is up to date now. I also added the errors for tds and myxql adapters, and fixed the broken Postgres test. All of the Postgres tests are passing for me locally, but I am having issues with the TDS and MySQL tests locally as I don't have those databases installed. |
No worries. Ok so just a couple small things then we can merge once the Ecto change is merged:
|
a442e72
to
a1e3581
Compare
a1e3581
to
7696ca4
Compare
@greg-rychlewski Made all of the changes to this PR and the ecto PR. Should be good to run the tests again. |
Thanks @wilkinson4 looks great! Just need to update mix.lock with the Ecto commit we just merged then it's good to go :). |
@greg-rychlewski You want me to add this: |
Sorry I wasn't very clear. Please change mix.exs to this
Then |
7242cc0
to
70c999e
Compare
Thank you! These are nice changes. |
Thank you for all your help! |
No description provided.