Skip to content

Conversation

@aidanharan
Copy link
Contributor

@aidanharan aidanharan commented Apr 19, 2021

Fix the The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified test errors.

The Arel::Visitors::ToSql#collect_in_clause method was removed in rails/rails#39057 so the fix for the issue (#758) needs to be moved.

Before
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/runs/2382157889
7130 runs, 20222 assertions, 28 failures, 33 errors, 36 skips

After
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/890/checks?check_run_id=2384346870
7133 runs, 20264 assertions, 28 failures, 19 errors, 36 skips

@aidanharan aidanharan changed the title Fix removal of invalid ordering from select statements Rails 6.1: Fix removal of invalid ordering from select statements Apr 19, 2021
@aidanharan aidanharan force-pushed the remove-invalid-ordering-from-in-clause branch from 4685e6a to be7b922 Compare April 19, 2021 19:52
@aidanharan aidanharan force-pushed the remove-invalid-ordering-from-in-clause branch from be7b922 to e08fe43 Compare April 19, 2021 19:54
@aidanharan aidanharan marked this pull request as ready for review April 19, 2021 20:06
@wpolicarpo wpolicarpo merged commit 059d244 into rails-sqlserver:main Apr 19, 2021
lavika pushed a commit to lavika/activerecord-sqlserver-adapter that referenced this pull request Sep 26, 2023
…er#890)

Co-authored-by: Aidan Haran <aharan@fusioneer.com>
Co-authored-by: Wanderson Policarpo <wpolicarpo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants