You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/17 17:40:38 UTC

[GitHub] [airflow] o-nikolas commented on a diff in pull request #27095: Allow session properties for trino connection

o-nikolas commented on code in PR #27095:
URL: https://github.com/apache/airflow/pull/27095#discussion_r997341723


##########
airflow/providers/trino/hooks/trino.py:
##########
@@ -145,6 +147,7 @@ def get_conn(self) -> Connection:
             # type: ignore[func-returns-value]
             isolation_level=self.get_isolation_level(),
             verify=_boolify(extra.get('verify', True)),
+            session_properties=ast.literal_eval(session_properties) if session_properties else None,

Review Comment:
   Any reason you're using `ast.literal_eval` here instead of `json.loads`?



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