You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vincbeck (via GitHub)" <gi...@apache.org> on 2024/07/02 17:03:02 UTC
Re: [PR] fix :RedshiftDataOperator fails when return_sql_result is true [airflow]
vincbeck commented on code in PR #40443:
URL: https://github.com/apache/airflow/pull/40443#discussion_r1657158383
##########
airflow/providers/amazon/aws/operators/redshift_data.py:
##########
@@ -110,63 +103,64 @@ def __init__(
self.statement_name = statement_name
self.with_event = with_event
self.wait_for_completion = wait_for_completion
- if poll_interval > 0:
- self.poll_interval = poll_interval
- else:
- self.log.warning(
- "Invalid poll_interval:",
- poll_interval,
- )
+ self.poll_interval = max(poll_interval, 1)
self.return_sql_result = return_sql_result
self.statement_id: str | None = None
self.deferrable = deferrable
def execute(self, context: Context) -> GetStatementResultResponseTypeDef | str:
Review Comment:
We now return a list right? Same for `execute_complete`
```suggestion
def execute(self, context: Context) -> list[GetStatementResultResponseTypeDef] | str:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org