-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only count bad refs when
moved
table exists (#23491)
This keeps the logic to fail without upgrading when (A) there are bad rows and (B) the "moved" table already exists. But we optimize so that we don't count the bad rows unless the "moved" table is there. Previously we counted always, but the first time a user attempts upgrade, the tables won't be there so there's no point in counting. Instead what we do is skip right to the CTAS, creating the _airflow_moved tables. If there aren't any rows in the "moved" table, then we delete the table immediately. Also included here is a delete optimization, where we join to the moved table instead of running the not exists query again. Co-authored-by: Jed Cunningham <[email protected]> Co-authored-by: Ash Berlin-Taylor <[email protected]> (cherry picked from commit 6cc41ab)
- Loading branch information
1 parent
e4521ef
commit d9075f8
Showing
1 changed file
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters