Skip to content

Commit 9bd2cc1

Browse files
authored
Merge pull request #2251 from yahonda/backport_2249_to_release70
Merge pull request #2249 from swamp09/fix_columns_for_distinct
2 parents ba22ee6 + b4b88ea commit 9bd2cc1

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)