You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kirubankamaraj (via GitHub)" <gi...@apache.org> on 2025/08/09 17:38:01 UTC

[PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

kirubankamaraj opened a new pull request, #54302:
URL: https://github.com/apache/airflow/pull/54302

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   This PR is for supporting Greater than and less than range filters, as of now airflow only supported GTE and LTE.  [ISSUE](https://github.com/apache/airflow/issues/9237)
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #54302:
URL: https://github.com/apache/airflow/pull/54302#discussion_r2270389788


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py:
##########
@@ -168,3 +168,11 @@ class DAGRunsBatchBody(StrictBaseModel):
     start_date_lte: AwareDatetime | None = None
     end_date_gte: AwareDatetime | None = None
     end_date_lte: AwareDatetime | None = None
+    run_after_gt: AwareDatetime | None = None
+    run_after_lt: AwareDatetime | None = None
+    logical_date_gt: AwareDatetime | None = None
+    logical_date_lt: AwareDatetime | None = None
+    start_date_gt: AwareDatetime | None = None
+    start_date_lt: AwareDatetime | None = None
+    end_date_gt: AwareDatetime | None = None
+    end_date_lt: AwareDatetime | None = None

Review Comment:
   nit: Maybe sort this, so xxx_gt, xxx_gte, xxx_lt, xxx_lte and up together, it will be easier to read



##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -526,8 +528,14 @@ def to_orm(self, select: Select) -> Select:
 
         if self.value and self.value.lower_bound:
             select = select.where(self.attribute >= self.value.lower_bound)
+        if self.value and self.value.lower_bound_excluded:
+            select = select.where(self.attribute > self.value.lower_bound_excluded)
+
         if self.value and self.value.upper_bound:
             select = select.where(self.attribute <= self.value.upper_bound)
+        if self.value and self.value.upper_bound_excluded:
+            select = select.where(self.attribute < self.value.upper_bound_excluded)
+

Review Comment:
   same



##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -565,9 +583,17 @@ def float_range_filter_factory(
     def depends_float(
         lower_bound: float | None = Query(alias=f"{filter_name}_gte", default=None),
         upper_bound: float | None = Query(alias=f"{filter_name}_lte", default=None),
+        lower_bound_excluded: float | None = Query(alias=f"{filter_name}_gt", default=None),
+        upper_bound_excluded: float | None = Query(alias=f"{filter_name}_lt", default=None),
     ) -> RangeFilter:
         return RangeFilter(
-            Range(lower_bound=lower_bound, upper_bound=upper_bound), getattr(model, filter_name)
+            Range(
+                lower_bound=lower_bound,
+                upper_bound=upper_bound,
+                lower_bound_excluded=lower_bound_excluded,
+                upper_bound_excluded=upper_bound_excluded,

Review Comment:
   Same here.



##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -526,8 +528,14 @@ def to_orm(self, select: Select) -> Select:
 
         if self.value and self.value.lower_bound:
             select = select.where(self.attribute >= self.value.lower_bound)
+        if self.value and self.value.lower_bound_excluded:
+            select = select.where(self.attribute > self.value.lower_bound_excluded)
+

Review Comment:
   That should be an if/else. Even if the second if will shadow the first one at query time by it's logic, there is no need to make the emitted sql query more complex than necessary.



##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/task_instances.py:
##########
@@ -116,6 +116,16 @@ class TaskInstancesBatchBody(StrictBaseModel):
     end_date_lte: AwareDatetime | None = None
     duration_gte: float | None = None
     duration_lte: float | None = None
+    run_after_gt: AwareDatetime | None = None
+    run_after_lt: AwareDatetime | None = None
+    logical_date_gt: AwareDatetime | None = None
+    logical_date_lt: AwareDatetime | None = None
+    start_date_gt: AwareDatetime | None = None
+    start_date_lt: AwareDatetime | None = None
+    end_date_gt: AwareDatetime | None = None
+    end_date_lt: AwareDatetime | None = None
+    duration_gt: float | None = None
+    duration_lt: float | None = None

Review Comment:
   Same, we can sort only the 'range' portion here



##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -565,9 +583,17 @@ def float_range_filter_factory(
     def depends_float(
         lower_bound: float | None = Query(alias=f"{filter_name}_gte", default=None),
         upper_bound: float | None = Query(alias=f"{filter_name}_lte", default=None),
+        lower_bound_excluded: float | None = Query(alias=f"{filter_name}_gt", default=None),
+        upper_bound_excluded: float | None = Query(alias=f"{filter_name}_lt", default=None),

Review Comment:
   Maybe we should take the opportunity to rename variables (private python interface) because it starts getting confusing in the naming IMOH.
   
   ```suggestion
           lower_bound_gte: float | None = Query(alias=f"{filter_name}_gte", default=None),
           lower_bound_gt: float | None = Query(alias=f"{filter_name}_gt", default=None),
           upper_bound_lte: float | None = Query(alias=f"{filter_name}_lte", default=None),
           upper_bound_lt: float | None = Query(alias=f"{filter_name}_lt", default=None),
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3194025697

   @pierrejeambrun @jason810496 I have resolved the comments and fixed the pre-commit failure, can someone approve this?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on code in PR #54302:
URL: https://github.com/apache/airflow/pull/54302#discussion_r2270532768


##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -526,8 +528,14 @@ def to_orm(self, select: Select) -> Select:
 
         if self.value and self.value.lower_bound:
             select = select.where(self.attribute >= self.value.lower_bound)
+        if self.value and self.value.lower_bound_excluded:
+            select = select.where(self.attribute > self.value.lower_bound_excluded)
+

Review Comment:
   @pierrejeambrun I feel the same while writing this but then thinking the case if the user pass lower_lte and lower_lt we can't only took any one because it's depend on the query value, if upper_bound_lte is 10 and upper_bound_lt is 5 then the data needs to be less than five and the same for vice versa case. 
   
   If you feel current statement is making query complex then I can find the min value and use that with the respect condition, and max value for lower bound. is that okay for you?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3215132957

   @pierrejeambrun your comments and static check failure resolved kindly review and approve.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3216200572

   Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3177663424

   @jason810496 looks like CI pipeline test completed, can you review and approve this?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #54302:
URL: https://github.com/apache/airflow/pull/54302#discussion_r2284777780


##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -526,8 +528,14 @@ def to_orm(self, select: Select) -> Select:
 
         if self.value and self.value.lower_bound:
             select = select.where(self.attribute >= self.value.lower_bound)
+        if self.value and self.value.lower_bound_excluded:
+            select = select.where(self.attribute > self.value.lower_bound_excluded)
+

Review Comment:
   Lets revert to your original idea, this is making thing overly complicated. If a value is defined, apply the filter. And yes if both lt and lte filters are defined for instance, both filters will be applied and the database will take care of filtering the relevant results.
   
   Sorry for the back and forth, I didn't think about the case mentioned above



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3216198024

   @pierrejeambrun CI test successfully completed, can you merge?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "jason810496 (via GitHub)" <gi...@apache.org>.
jason810496 merged PR #54302:
URL: https://github.com/apache/airflow/pull/54302


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3194331155

   Thanks jason, now only checked the announcement email. I'll change and update the 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3194173925

   <img width="1195" height="915" alt="image" src="https://github.com/user-attachments/assets/81b046c7-2f9f-4a33-af8c-ab85d3f20aaf" />
   
   Statics checks are passed in my machine, but IDK why it is failing in remote.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3171961362

   Working on testcases


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3171961186

   Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
   Here are some useful points:
   - Pay attention to the quality of your code (ruff, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-pre-commit-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
   - Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
   Apache Airflow is a community-driven project and together we are making it better 🚀.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on code in PR #54302:
URL: https://github.com/apache/airflow/pull/54302#discussion_r2270532768


##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -526,8 +528,14 @@ def to_orm(self, select: Select) -> Select:
 
         if self.value and self.value.lower_bound:
             select = select.where(self.attribute >= self.value.lower_bound)
+        if self.value and self.value.lower_bound_excluded:
+            select = select.where(self.attribute > self.value.lower_bound_excluded)
+

Review Comment:
   @pierrejeambrun I feel the same while writing this but then thinking the case if the user pass upper_bound_lte and upper_bound_lt we can't only took any one because it's depend on the query value, if upper_bound_lte is 10 and upper_bound_lt is 5 then the data needs to be less than five and the same for vice versa case. 
   
   If you feel current statement is making query complex then I can find the min value and use that with the respect condition, and max value for lower bound. is that okay for you?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3186363482

   @pierrejeambrun mentioned changes updated, kindly do review


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "jason810496 (via GitHub)" <gi...@apache.org>.
jason810496 commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3216200839

   I just merged it. Thanks for the reminder!


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3194358969

   And make sure to rebase:
   
   <img width="984" height="76" alt="Screenshot 2025-08-17 at 14 35 20" src="https://github.com/user-attachments/assets/cfb544b7-8041-4681-8b38-5f1cf477cc35" />
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3202444230

   As discussed - the installation of Python is broken and needs to be nuked. Likely it was installed on another Mac with different architecture and migrated to another.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3201050217

   
   
   
   > It's a bit strange. I can't reproduce the static check CI failure locally.
   
   I can able to reproduce failure with prek, but now after switched to prek, I'm facing the below issue while commiting
   
   <img width="1476" height="888" alt="image" src="https://github.com/user-attachments/assets/acfa14ea-58d4-4bfc-9951-e064c8b5e75a" />
   
   But I'm using mac M1 but the exception shows **system architecture is x86_64**
   
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on code in PR #54302:
URL: https://github.com/apache/airflow/pull/54302#discussion_r2270532768


##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -526,8 +528,14 @@ def to_orm(self, select: Select) -> Select:
 
         if self.value and self.value.lower_bound:
             select = select.where(self.attribute >= self.value.lower_bound)
+        if self.value and self.value.lower_bound_excluded:
+            select = select.where(self.attribute > self.value.lower_bound_excluded)
+

Review Comment:
   @pierrejeambrun I feel the same while writing this but then thinking the case if the user pass upper_bound_lte and upper_bound_lt we can't only take any one because it's depend on the query value, if upper_bound_lte is 10 and upper_bound_lt is 5 then the data needs to be less than five and the same for vice versa case. 
   
   If you feel current statement is making query complex then I can find the min value and use that with the respect condition, and max value for lower bound. is that okay for you?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "kirubankamaraj (via GitHub)" <gi...@apache.org>.
kirubankamaraj commented on code in PR #54302:
URL: https://github.com/apache/airflow/pull/54302#discussion_r2285003163


##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -526,8 +528,14 @@ def to_orm(self, select: Select) -> Select:
 
         if self.value and self.value.lower_bound:
             select = select.where(self.attribute >= self.value.lower_bound)
+        if self.value and self.value.lower_bound_excluded:
+            select = select.where(self.attribute > self.value.lower_bound_excluded)
+

Review Comment:
   No issues, I'll update the changes and let you know



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GT and LT Range filter supported in DagRuns and Task Instance list [airflow]

Posted by "jason810496 (via GitHub)" <gi...@apache.org>.
jason810496 commented on PR #54302:
URL: https://github.com/apache/airflow/pull/54302#issuecomment-3194338972

   > Thanks jason, now only checked the announcement email. I'll change and update the PR.
   
   Yeah, just run the following command to install `prek`
   ```bash
   uv tool install prek
   prek install -f
   ```
   and run the following command to fix the OpenAPI spec instead of running all checks.
   ```bash
   prek generate-openapi-spec --all-files
   ```


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org