Skip to content

Commit 5617efe

Browse files
authored
Merge pull request #2252 from yahonda/backport_2249_to_release61
Merge pull request #2249 from swamp09/fix_columns_for_distinct
2 parents 0314d54 + a111944 commit 5617efe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/oracle_enhanced_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ def columns_for_distinct(columns, orders) #:nodoc:
661661
}.reject(&:blank?).map.with_index { |column, i|
662662
"FIRST_VALUE(#{column}) OVER (PARTITION BY #{columns} ORDER BY #{column}) AS alias_#{i}__"
663663
}
664-
[super, *order_columns].join(", ")
664+
(order_columns << super).join(", ")
665665
end
666666

667667
def temporary_table?(table_name) #:nodoc:

0 commit comments

Comments
 (0)