jhtimmins commented on pull request #19294:
URL: https://github.com/apache/airflow/pull/19294#issuecomment-1024804994


   @ashb The most recent changes address a bug that only arises with MSSQL. Bc 
my changes to the permission models include prefetching of data, the 
`parameters.apply_sorting()` method doesn't work anymore 
https://github.com/apache/airflow/blob/main/airflow/api_connexion/parameters.py#L99.
 It's a utility method for allowing users to pass sort parameters to the API, 
and it then adds the order_by string to the query. This is problematic for 
joined queries, since sqlalchemy uses aliases to reference the joins and 
subqueries. MSSQL has a different alias naming scheme than the other DBs.
   
   My change addresses the two API functions that query on the permission 
models, and replaces the calls to `apply_sorting()` with localized code to 
handle the different sort arguments.
   
   I've duplicated some code, which I could remove by modifying the original 
`.apply_sorting()` method, but to prevent scope creep I'd rather do that in a 
future PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to