Skip to content

Commit fa6cda6

Browse files
authored
Merge pull request #2249 from swamp09/fix_columns_for_distinct
2 parents d1fc74d + 1c6ee6c commit fa6cda6

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
@@ -662,7 +662,7 @@ def columns_for_distinct(columns, orders) # :nodoc:
662662
}.reject(&:blank?).map.with_index { |column, i|
663663
"FIRST_VALUE(#{column}) OVER (PARTITION BY #{columns} ORDER BY #{column}) AS alias_#{i}__"
664664
}
665-
[super, *order_columns].join(", ")
665+
(order_columns << super).join(", ")
666666
end
667667

668668
def temporary_table?(table_name) # :nodoc:

0 commit comments

Comments
 (0)