-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Open
Labels
area:APIAirflow's REST/HTTP APIAirflow's REST/HTTP APIgood first issuekind:featureFeature RequestsFeature Requests
Description
Helllo,
We have the following ranger filter parameters:
- FilterDurationGTE
- FilterDurationLTE
- FilterEndDateGTE
- FilterEndDateLTE
- FilterExecutionDateGTE
- FilterExecutionDateLTE
- FilterStartDateGTE
- FilterStartDateLTE
Only closed ranged(in interval notation: [start_xxx, end_xxx]) can be fetched using them.
I think, filters representing ranges should use inclusive start values and exclusive end values (half-closed intervals); in interval notation: [start_xxx, end_xxx).
Exclusive end values are preferable for the following reasons:
- It conforms to user expectations, particularly for continuous values such as timestamps, and avoids the need to express imprecise “limit values” (e.g. 2012-04-20T23:59:59).
- It is consistent with most common programming languages, including C++, Java, Python, and Go.
- It is easier to reason about abutting ranges: [0, x), [x, y), [y, z), where values are chainable from one range to the next.
More information: https://google.aip.dev/145
Alternatively, we can also add LT and GT filters, but this could only complicate situations without much benefit. We would have 4 different parameters for one field. Changing parameter names and changing behavior seems better to me.
Best regards,
Kamil Breguła
ad-m
Metadata
Metadata
Assignees
Labels
area:APIAirflow's REST/HTTP APIAirflow's REST/HTTP APIgood first issuekind:featureFeature RequestsFeature Requests