Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add utility function for generic filter counting#54817

Merged
bbovenzi merged 2 commits intoapache:mainfrom
guan404ming:refactor-filter-utils
Aug 28, 2025
Merged

Add utility function for generic filter counting#54817
bbovenzi merged 2 commits intoapache:mainfrom
guan404ming:refactor-filter-utils

Conversation

Copy link
Member

guan404ming commented Aug 22, 2025

Related

#54671 (comment)

Why

  • There are several filter count logic could be reused.
  • Lots of filters will be added in 3.1.0 and most of them would also need the function to count filter

How

  • centralize filter counting logic
  • dynamically count filters and preserve type safe by TypeScript generic
  • add unit test for the new func

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

guan404ming requested review from bbovenzi, jscheffl, pierrejeambrun, ryanahamilton and shubhamraj-git as code owners August 22, 2025 04:20
boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Aug 22, 2025
guan404ming mentioned this pull request Aug 22, 2025
pierrejeambrun approved these changes Aug 22, 2025
Copy link
Member

pierrejeambrun left a comment *
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I don't think we need the excluded fields for now, I would just remove this to not over complicate it.

We can always add that back later on if needed. This will also make the function easier to type I believe.

guan404ming force-pushed the refactor-filter-utils branch from a585841 to c14a4af Compare August 22, 2025 14:23
Copy link
Member Author

guan404ming commented Aug 22, 2025 *
edited
Loading

Nice, I don't think we need the excluded fields for now, I would just remove this to not over complicate it. We can always add that back later on if needed. This will also make the function easier to type I believe.

Sure, it would be much easier to type. Current removed and I could help update it if needed in the future!

guan404ming force-pushed the refactor-filter-utils branch from c14a4af to f1bed1a Compare August 24, 2025 15:14
guan404ming force-pushed the refactor-filter-utils branch from f1bed1a to 6f728e2 Compare August 27, 2025 14:55
bbovenzi approved these changes Aug 28, 2025
bbovenzi merged commit d91e512 into apache:main Aug 28, 2025
55 checks passed
mangal-vairalkar pushed a commit to mangal-vairalkar/airflow that referenced this pull request Aug 30, 2025
* Add utility function for generic filter counting

* Remove excludeFields from getFilterCount
nothingmin pushed a commit to nothingmin/airflow that referenced this pull request Sep 2, 2025
* Add utility function for generic filter counting

* Remove excludeFields from getFilterCount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

bbovenzi bbovenzi approved these changes

pierrejeambrun pierrejeambrun approved these changes

ryanahamilton Awaiting requested review from ryanahamilton ryanahamilton is a code owner

jscheffl Awaiting requested review from jscheffl

shubhamraj-git Awaiting requested review from shubhamraj-git shubhamraj-git is a code owner

Assignees

No one assigned

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants