Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging multiple sql operators #9124

Merged
merged 5 commits into from
Jun 17, 2020

Conversation

samuelkhtu
Copy link
Contributor


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.

1. Merge check_operator.py into airflow.operators.sql
2. Merge sql_branch_operator.py into airflow.operators.sql
3. Merge unit test for both into test_sql.py
@samuelkhtu
Copy link
Contributor Author

When you have a chance, can you take a look? @mik-laj @eladkal. Thanks!

@eladkal
Copy link
Contributor

eladkal commented Jun 4, 2020

My thoughts (don't take any action for the moment lets wait for thoughts of others)

  1. I'm not sure if it requires deprecation warning for BranchSqlOperator. PR #8525 Add SQL Branch Operator  #8942 wasn't released yet. So the question is will it be released with this PR or not. If both PRs are released together then there is no need to maintain airflow/operators/sql_branch_operator.py with deprecation warning.
  2. PrestoCheckOperator(s) were deprecated in Remove Presto check operators #7884 and pointing to CheckOperator(s). By merging this PR they will point to another deprecated module. Maybe worth to fix the deprecation warning for the Presto Operators as well?

@samuelkhtu
Copy link
Contributor Author

Thanks @eladkal , @mik-laj any thought?

@mik-laj
Copy link
Member

mik-laj commented Jun 9, 2020

Can you add these cases to the list of changed classes? The file name suggests something different, but that's a different problem. Here we have all the name changes that we then use to generate the documentation.
https://github.com/apache/airflow/blob/master/tests/test_core_to_contrib.py#L427

@samuelkhtu
Copy link
Contributor Author

Yes @mik-laj Thank you for the feedback. I will work on this ASAP.

@samuelkhtu
Copy link
Contributor Author

Hi @mik-laj when you have a chance, can you take a look? Thanks.

@mik-laj mik-laj merged commit 0b9bf4a into apache:master Jun 17, 2020
@mik-laj mik-laj changed the title [AIRFLOW-9099] Merging multiple sql operators Merging multiple sql operators Jun 17, 2020
@mik-laj
Copy link
Member

mik-laj commented Jun 17, 2020

Close #9099

@eladkal
Copy link
Contributor

eladkal commented Jun 17, 2020

great work @samuelkhtu
@mik-laj can you cherry pick both PRs #8942 and current to next release? It's core operator so it won't be released in future providers package releases.

@mik-laj
Copy link
Member

mik-laj commented Jun 17, 2020

@eladkal I am not a release manager. I focus only on the development of Airflow 2.0

@potiuk potiuk added this to the Airflow 1.10.11 milestone Jun 17, 2020
@potiuk
Copy link
Member

potiuk commented Jun 17, 2020

I added it to milestone 1.10.11 it seems easy to cherry pick. Let's see if we manage to do it.

@kaxil
Copy link
Member

kaxil commented Jun 17, 2020

This PR has failing tests

@kaxil
Copy link
Member

kaxil commented Jun 17, 2020

FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_class_deprecated_100_airflow_operators_check_operator_CheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_class_deprecated_101_airflow_operators_check_operator_IntervalCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_class_deprecated_102_airflow_operators_check_operator_ValueCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_class_deprecated_103_airflow_operators_check_operator_ThresholdCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_class_deprecated_104_airflow_operators_sql_branch_operator_BranchSqlOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_subclass_274_airflow_operators_check_operator_CheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_subclass_275_airflow_operators_check_operator_IntervalCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_subclass_276_airflow_operators_check_operator_ValueCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_subclass_277_airflow_operators_check_operator_ThresholdCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_is_subclass_278_airflow_operators_sql_branch_operator_BranchSqlOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_warning_on_import_274_airflow_operators_check_operator_CheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_warning_on_import_275_airflow_operators_check_operator_IntervalCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_warning_on_import_276_airflow_operators_check_operator_ValueCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_warning_on_import_277_airflow_operators_check_operator_ThresholdCheckOperator
FAILED tests/test_core_to_contrib.py::TestMovingCoreToContrib::test_warning_on_import_278_airflow_operators_sql_branch_operator_BranchSqlOperator

@mik-laj
Copy link
Member

mik-laj commented Jun 17, 2020

@kaxil I working on it now.

mik-laj pushed a commit to PolideaInternal/airflow that referenced this pull request Jun 17, 2020
@mik-laj mik-laj mentioned this pull request Jun 17, 2020
6 tasks
kaxil pushed a commit that referenced this pull request Jun 17, 2020
potiuk pushed a commit that referenced this pull request Jun 20, 2020
* Merge various SQL Operators into sql.py

* Fix unit test code format

* Merge multiple SQL operators into one

1. Merge check_operator.py into airflow.operators.sql
2. Merge sql_branch_operator.py into airflow.operators.sql
3. Merge unit test for both into test_sql.py

* Rename test_core_to_contrib Interval/ValueCheckOperator to SQLInterval/ValueCheckOperator

* Fixed deprecated class and added check to test_core_to_contrib

(cherry picked from commit 0b9bf4a)
potiuk pushed a commit that referenced this pull request Jun 20, 2020
* Merge various SQL Operators into sql.py

* Fix unit test code format

* Merge multiple SQL operators into one

1. Merge check_operator.py into airflow.operators.sql
2. Merge sql_branch_operator.py into airflow.operators.sql
3. Merge unit test for both into test_sql.py

* Rename test_core_to_contrib Interval/ValueCheckOperator to SQLInterval/ValueCheckOperator

* Fixed deprecated class and added check to test_core_to_contrib

(cherry picked from commit 0b9bf4a)
kaxil pushed a commit to kaxil/airflow that referenced this pull request Jun 27, 2020
* Merge various SQL Operators into sql.py

* Fix unit test code format

* Merge multiple SQL operators into one

1. Merge check_operator.py into airflow.operators.sql
2. Merge sql_branch_operator.py into airflow.operators.sql
3. Merge unit test for both into test_sql.py

* Rename test_core_to_contrib Interval/ValueCheckOperator to SQLInterval/ValueCheckOperator

* Fixed deprecated class and added check to test_core_to_contrib
kaxil pushed a commit to kaxil/airflow that referenced this pull request Jun 27, 2020
potiuk pushed a commit that referenced this pull request Jun 29, 2020
* Merge various SQL Operators into sql.py

* Fix unit test code format

* Merge multiple SQL operators into one

1. Merge check_operator.py into airflow.operators.sql
2. Merge sql_branch_operator.py into airflow.operators.sql
3. Merge unit test for both into test_sql.py

* Rename test_core_to_contrib Interval/ValueCheckOperator to SQLInterval/ValueCheckOperator

* Fixed deprecated class and added check to test_core_to_contrib

(cherry picked from commit 0b9bf4a)
kaxil pushed a commit that referenced this pull request Jul 1, 2020
* Merge various SQL Operators into sql.py

* Fix unit test code format

* Merge multiple SQL operators into one

1. Merge check_operator.py into airflow.operators.sql
2. Merge sql_branch_operator.py into airflow.operators.sql
3. Merge unit test for both into test_sql.py

* Rename test_core_to_contrib Interval/ValueCheckOperator to SQLInterval/ValueCheckOperator

* Fixed deprecated class and added check to test_core_to_contrib

(cherry picked from commit 0b9bf4a)
@eladkal eladkal mentioned this pull request Jul 15, 2020
6 tasks
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
* Merge various SQL Operators into sql.py

* Fix unit test code format

* Merge multiple SQL operators into one

1. Merge check_operator.py into airflow.operators.sql
2. Merge sql_branch_operator.py into airflow.operators.sql
3. Merge unit test for both into test_sql.py

* Rename test_core_to_contrib Interval/ValueCheckOperator to SQLInterval/ValueCheckOperator

* Fixed deprecated class and added check to test_core_to_contrib

(cherry picked from commit 0b9bf4a)
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.

5 participants