rails/arel — pull request #211 by yahonda (2013-10-11 16:04:57+00:00)
Title: Support `columns_for_distinct` with Oracle adapter

Since rails/rails#6792 merged to rails, ActiveRecord supports `columns_for_distinct` then `distinct` method willbe deprecated.

Although Oracle enhanced adapter suppports `columns_for_distinct` method in rsim/oracle-enhanced#340. To make this change work Arel support is necessary because `distinct_columns` method does not provide the `DISTINCT` to predictions. `visit_Arel_Nodes_SelectStatement ` and `order_hacks` method uses conditions to see if `DISTINCT` is inside of projections.

I was able to find to use `set_quantifier` in `visit_Arel_Nodes_SelectStatement`, which makes every Oracle enhanced adapter unit test and ActiveRecord unit test works, still getting Arel unit test failure.

It would be very helpful if someone review my pull request and give some feedback.