forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor dangling row check to use SQLA queries (apache#19808)
This is a prepaoratory refactor to have the move dangling rows pre-upgrade check make better use of the SQLA Queries -- this is needed because in a future PR we will add a check for dangling XCom rows, and that will need to conditionally join against DagRun to get execution_date (depending on if it is run pre- or post-2.2). This has been tested with Postgres 9.6, SQLite, MSSQL 2017 and MySQL 5.7 codespell didn't like `froms` as it thinks it is a typo of forms, and most other cases it would be, except here. Codespell doesn't currently have a method of ignoring a _single_ line without ignoring the word everywhere (which we don't want to do) so I have to ignore the exact _line_. Sad panda
- Loading branch information
Showing
4 changed files
with
77 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
f"DELETE {source_table} FROM { ', '.join(_from_name(tbl) for tbl in stmt.froms) }" | ||
for frm in source_query.selectable.froms: |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
.coverage | ||
.coveragerc | ||
.codecov.yml | ||
.codespellignorelines | ||
.eslintrc | ||
.eslintignore | ||
.flake8 | ||
|
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