Skip to content

Commit 3baaffe

Browse files
committed
Remove #columns_for_distinct since abstract default is same.
1 parent aedc3e2 commit 3baaffe

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

lib/active_record/connection_adapters/sqlserver/schema_statements.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@ def new_column(name, default, cast_type, sql_type = nil, null = true, sqlserver_
5555
SQLServerColumn.new name, default, cast_type, sql_type, null, sqlserver_options
5656
end
5757

58-
# like postgres, sqlserver requires the ORDER BY columns in the select list for distinct queries, and
59-
# requires that the ORDER BY include the distinct column. Unfortunately, sqlserver does not support
60-
# DISTINCT ON () like Posgres, or FIRST_VALUE() like Oracle (at least before SQL Server 2012). Because
61-
# of these facts, we don't actually add any extra columns for distinct, but instead have to create
62-
# a subquery with ROW_NUMBER() and DENSE_RANK() in our monkey-patches to Arel.
63-
def columns_for_distinct(columns, _orders) #:nodoc:
64-
columns
65-
end
66-
6758
def rename_table(table_name, new_name)
6859
do_execute "EXEC sp_rename '#{table_name}', '#{new_name}'"
6960
rename_table_indexes(table_name, new_name)

0 commit comments

Comments
 (0)