Closed fatkodima closed 6 years ago
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @tenderlove (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.
Per #523, Arel development is moving to rails/rails.
If this PR is still relevant, please consider reopening it over there.
Fixes https://github.com/rails/arel/pull/118.
This is an updated and changed/simplified version of https://github.com/rails/arel/pull/320. The idea remains the same (
SelectManager
returns a newSelectManager
on calls tounion/intersect/except
with, basically speaking, N-aryUnion/Intersect/Except
s taking place ofSelectCore
s insideSelectStatement
).TOP
related code forSelectStatement
was removed because it is basically anoop
operation and will require implement also noop method forUnion/.../...
classes to work here https://github.com/rails/arel/blob/df2b74b53664cc3ce3a49156c555b84c134bb75a/lib/arel/select_manager.rb#L224Also, squashing braces in unions for MySQL was removed to allow applying limits and orders for individual queries. As stated in documentation:
But was introduced for SQLite, as it has troubles with parenthesized union subqueries and ordering + limits in them.
I'm also wondering, should all changed behavior be extensively deprecated or this PR can be merged in the next major version without any?