pierrejeambrun commented on code in PR #57828:
URL: https://github.com/apache/airflow/pull/57828#discussion_r2494492229


##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -251,11 +251,6 @@ def to_orm(self, select: Select) -> Select:
             if column is None:
                 column = getattr(self.model, lstriped_orderby)
 
-            # MySQL does not support `nullslast`, and True/False ordering 
depends on the
-            # database implementation.
-            nullscheck = case((column.isnot(None), 0), else_=1)
-
-            columns.append(nullscheck)

Review Comment:
   Maybe a completely dumb question, but if we really want this, would this 
work with two indexes? 
   ```
   CREATE INDEX idx_dag_run_start_date_nf ON dag_run (start_date NULLS FIRST);
   CREATE INDEX idx_dag_run_start_date_nl ON dag_run (start_date NULLS LAST);
   ```
   So the planner can always find an index with 'nulls last' for both `asc` and 
`desc`



-- 
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