diff --git a/desktop/core/ext-py3/python-sasl-0.3.1/sasl/saslwrapper.cpython-39-darwin.so b/desktop/core/ext-py3/python-sasl-0.3.1/sasl/saslwrapper.cpython-39-darwin.so new file mode 100755 index 00000000000..32c42edb230 Binary files /dev/null and b/desktop/core/ext-py3/python-sasl-0.3.1/sasl/saslwrapper.cpython-39-darwin.so differ diff --git a/desktop/libs/notebook/src/notebook/connectors/trino.py b/desktop/libs/notebook/src/notebook/connectors/trino.py index da5bc77835a..4cf626a5b56 100644 --- a/desktop/libs/notebook/src/notebook/connectors/trino.py +++ b/desktop/libs/notebook/src/notebook/connectors/trino.py @@ -343,6 +343,11 @@ def _get_columns(self, database, table): for col in columns ] + def get_log(self, notebook, snippet, startFrom=None, size=None): + guid = snippet['result']['handle']['guid'] if snippet.get('result') and snippet['result'].get('handle') and \ + snippet['result']['handle'].get('guid') else None + return f"query_id: {guid}" + @query_error_handler def explain(self, notebook, snippet): statement = snippet['statement'].rstrip(';') diff --git a/desktop/libs/notebook/src/notebook/connectors/trino_tests.py b/desktop/libs/notebook/src/notebook/connectors/trino_tests.py index e15ca870469..fa08c5ba916 100644 --- a/desktop/libs/notebook/src/notebook/connectors/trino_tests.py +++ b/desktop/libs/notebook/src/notebook/connectors/trino_tests.py @@ -354,3 +354,19 @@ def test_auth_password_script(self, mock_default_password): with patch('notebook.connectors.trino.coerce_password_from_script', return_value='custom_password_script'): trino_api = TrinoApi(self.user, interpreter=interpreter) assert trino_api.auth_password == 'custom_password_script' + + def test_get_log(self): + notebook = {} + snippet = { + 'result': { + 'handle': { + 'guid': '1234-abcd-5678-efgh' + } + } + } + + # Expected result + expected_log = "query_id: 1234-abcd-5678-efgh" + result = self.trino_api.get_log(notebook, snippet) + + assert result == expected_log