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

Fix SAWarning 'Coercing Subquery object into a select() for use in IN()' #38926

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

Taragolis
Copy link
Contributor

@Taragolis Taragolis commented Apr 11, 2024

This is not necessary to call subquery if we intend to use select statement into the in statement.
This one just produce annoying warning.

[
  {
    "category": "sqlalchemy.exc.SAWarning",
    "message": "Coercing Subquery object into a select() for use in IN(); please pass a select() construct explicitly",
    "node_id": "tests/api_connexion/endpoints/test_import_error_endpoint.py::TestGetImportErrorsEndpoint::test_get_import_errors_single_dag",
    "filename": "airflow/api_connexion/endpoints/import_error_endpoint.py",
    "lineno": 100,
    "count": 1
  },
  {
    "category": "sqlalchemy.exc.SAWarning",
    "message": "Coercing Subquery object into a select() for use in IN(); please pass a select() construct explicitly",
    "node_id": "tests/api_connexion/endpoints/test_import_error_endpoint.py::TestGetImportErrorsEndpoint::test_get_import_errors_single_dag",
    "filename": "airflow/api_connexion/endpoints/import_error_endpoint.py",
    "lineno": 101,
    "count": 1
  },
  {
    "category": "sqlalchemy.exc.SAWarning",
    "message": "Coercing Subquery object into a select() for use in IN(); please pass a select() construct explicitly",
    "node_id": "tests/www/views/test_views_home.py::test_home_importerrors_filtered_singledag_user",
    "filename": "airflow/www/views.py",
    "lineno": 954,
    "count": 6
  },
  {
    "category": "sqlalchemy.exc.SAWarning",
    "message": "Coercing Subquery object into a select() for use in IN(); please pass a select() construct explicitly",
    "node_id": "tests/utils/test_db_cleanup.py::TestDBCleanup::test__cleanup_table",
    "filename": "airflow/utils/db_cleanup.py",
    "lineno": 189,
    "count": 5
  }
]

^ 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 newsfragments.

@Taragolis Taragolis added type:bug-fix Changelog: Bug Fixes full tests needed We need to run full set of tests for this PR to merge labels Apr 11, 2024
@Taragolis Taragolis added this to the Airflow 2.9.1 milestone Apr 11, 2024
@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:webserver Webserver related Issues labels Apr 11, 2024
@Taragolis Taragolis merged commit 05ba268 into apache:main Apr 11, 2024
69 checks passed
@Taragolis Taragolis deleted the sa-coercing-subquery branch April 11, 2024 19:18
utkarsharma2 pushed a commit to astronomer/airflow that referenced this pull request Apr 22, 2024
jedcunningham pushed a commit that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:webserver Webserver related Issues full tests needed We need to run full set of tests for this PR to merge type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants