Skip to content

Remove redundant count query in BaseOperator.clear()#9362

Merged
kaxil merged 1 commit intoapache:masterfrom
astronomer:remove-cpunt
Jun 18, 2020
Merged

Remove redundant count query in BaseOperator.clear()#9362
kaxil merged 1 commit intoapache:masterfrom
astronomer:remove-cpunt

Conversation

@kaxil
Copy link
Copy Markdown
Member

@kaxil kaxil commented Jun 17, 2020

We already fetch the results using qry.all() so running qry.count() is just redundant.


Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

In case of fundamental code change, 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 UPDATING.md.
Read the Pull Request Guidelines for more information.

@kaxil kaxil requested a review from mik-laj June 17, 2020 23:52
We already fetch the results using `qry.all()` so running `qry.count()` is just redundant.
@kaxil kaxil merged commit 8c9a7b2 into apache:master Jun 18, 2020
@kaxil kaxil deleted the remove-cpunt branch June 18, 2020 00:47
@kaxil kaxil added this to the Airflow 1.10.11 milestone Jun 18, 2020
dimberman pushed a commit that referenced this pull request Jun 18, 2020
We already fetch the results using `qry.all()` so running `qry.count()` is just redundant.

(cherry picked from commit 8c9a7b2)
potiuk pushed a commit that referenced this pull request Jun 29, 2020
We already fetch the results using `qry.all()` so running `qry.count()` is just redundant.

(cherry picked from commit 8c9a7b2)
kaxil added a commit that referenced this pull request Jul 1, 2020
We already fetch the results using `qry.all()` so running `qry.count()` is just redundant.

(cherry picked from commit 8c9a7b2)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
We already fetch the results using `qry.all()` so running `qry.count()` is just redundant.

(cherry picked from commit 8c9a7b2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants