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

Add requires_result_fetch Configuration to SQLExecuteQueryOperator #46997

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EdenKik
Copy link

@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

@@ -253,6 +253,7 @@ def __init__(
split_statements: bool | None = None,
return_last: bool = True,
show_return_value_in_logs: bool = False,
requires_result_fetch: bool = False,
Copy link
Contributor

Choose a reason for hiding this comment

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

Add this also to class init doc

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
2 participants