Skip to content

Conversation

@EdenKik
Copy link
Contributor

@EdenKik EdenKik commented Feb 23, 2025


This PR introduces a new configuration option within SQLExecuteQueryOperator: requires_output_processing.
When True, the operator ensures that query results are fetched, preventing premature cancellations (required for Trino and similar engines).
When False, it behaves as before, skipping result processing if not needed.

closes: #46808
related: #46808

@EdenKik EdenKik requested a review from eladkal as a code owner February 23, 2025 16:39
@EdenKik EdenKik changed the title Add requires_output_processing Configuration to SQLExecuteQueryOperator Add requires_result_fetch Configuration to SQLExecuteQueryOperator Feb 23, 2025
Copy link
Contributor

@nevcohen nevcohen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just add also unitest for this case

@EdenKik EdenKik force-pushed the fix/trino-requires-result-fetch branch from 6339f7e to 91630a2 Compare February 24, 2025 10:41
@EdenKik EdenKik force-pushed the fix/trino-requires-result-fetch branch from 91630a2 to 59739b4 Compare March 1, 2025 20:26
@EdenKik
Copy link
Contributor Author

EdenKik commented Mar 1, 2025

@nevcohen
Done with implementing the requested changes, let me know if further adjustments are needed :)

@EdenKik EdenKik force-pushed the fix/trino-requires-result-fetch branch from 59739b4 to 846a62b Compare March 1, 2025 21:16
Copy link
Contributor

@nevcohen nevcohen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All due respect! Looks great!

@EdenKik EdenKik force-pushed the fix/trino-requires-result-fetch branch from 846a62b to 893d966 Compare March 3, 2025 07:50
@EdenKik
Copy link
Contributor Author

EdenKik commented Mar 17, 2025

@potiuk
would appreciate your review and merge on this PR in your time, as it's been waiting for maintainer approval for a while.
Thanks :)

@potiuk potiuk force-pushed the fix/trino-requires-result-fetch branch from 893d966 to 6a1d049 Compare April 1, 2025 16:15
@potiuk
Copy link
Member

potiuk commented Apr 1, 2025

Rebased and re-run - but there were some mypy checks. Please ping me if you solve them or in case rebase will see them green

@EdenKik
Copy link
Contributor Author

EdenKik commented Apr 1, 2025

Rebased and re-run - but there were some mypy checks. Please ping me if you solve them or in case rebase will see them green

Seems like all checks have passed successfully

@potiuk potiuk merged commit 65b90d8 into apache:main Apr 1, 2025
61 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Apr 1, 2025

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
…pache#46997)

* Added configuration to allow fetch results in SQLExecuteQueryOperator

* Fix Trino example with SQLExecuteQueryOperator

* Add unit test for requires_result_fetch in SQLExecuteQueryOperator
diogotrodrigues pushed a commit to diogotrodrigues/airflow that referenced this pull request Apr 6, 2025
…pache#46997)

* Added configuration to allow fetch results in SQLExecuteQueryOperator

* Fix Trino example with SQLExecuteQueryOperator

* Add unit test for requires_result_fetch in SQLExecuteQueryOperator
simonprydden pushed a commit to simonprydden/airflow that referenced this pull request Apr 8, 2025
…pache#46997)

* Added configuration to allow fetch results in SQLExecuteQueryOperator

* Fix Trino example with SQLExecuteQueryOperator

* Add unit test for requires_result_fetch in SQLExecuteQueryOperator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQLExecuteQueryOperator with Trino: Query Cancellation Due to Missing Result Fetching

3 participants