Skip to content

Commit

Permalink
Merge pull request rsim#2249 from swamp09/fix_columns_for_distinct
Browse files Browse the repository at this point in the history
  • Loading branch information
yahonda committed Jan 20, 2022
1 parent ba22ee6 commit b4b88ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def columns_for_distinct(columns, orders) # :nodoc:
}.reject(&:blank?).map.with_index { |column, i|
"FIRST_VALUE(#{column}) OVER (PARTITION BY #{columns} ORDER BY #{column}) AS alias_#{i}__"
}
[super, *order_columns].join(", ")
(order_columns << super).join(", ")
end

def temporary_table?(table_name) # :nodoc:
Expand Down

0 comments on commit b4b88ea

Please sign in to comment.