kazanzhy commented on PR #23767: URL: https://github.com/apache/airflow/pull/23767#issuecomment-1130634796
@turbaszek As I understand this method overrides `DbApiHook.run()`. I see that this possible error (`... referenced before assignment`) might be in DbApiHook, DatabricksSqlHook, **SnowflakeHook**, and ExasolHook. TrinoHook and PrestoHook also override `DbApiHook.run()` but take a string as an SQL parameter. So, here we could decide how we could handle the situation when `some_hook.run(sql=[])`. Therefore `ValueError` seems to be a good solution. For example, if we trying to run an empty string using `psycopg2` it raises `ProgrammingError: can't execute an empty query`. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
