Skip to content

Commit

Permalink
Merge pull request #2252 from yahonda/backport_2249_to_release61
Browse files Browse the repository at this point in the history
Merge pull request #2249 from swamp09/fix_columns_for_distinct
  • Loading branch information
yahonda authored Jan 20, 2022
2 parents 0314d54 + a111944 commit 5617efe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,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 5617efe

Please sign in to comment.