File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/databricks/sql/backend/sea Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 5252def _filter_session_configuration (
5353 session_configuration : Optional [Dict [str , Any ]],
5454) -> Dict [str , str ]:
55+ """
56+ Filter and normalise the provided session configuration parameters.
57+
58+ The Statement Execution API supports only a subset of SQL session
59+ configuration options. This helper validates the supplied
60+ ``session_configuration`` dictionary against the allow-list defined in
61+ ``ALLOWED_SESSION_CONF_TO_DEFAULT_VALUES_MAP`` and returns a new
62+ dictionary that contains **only** the supported parameters.
63+
64+ Args:
65+ session_configuration: Optional mapping of session configuration
66+ names to their desired values. Key comparison is
67+ case-insensitive.
68+
69+ Returns:
70+ Dict[str, str]: A dictionary containing only the supported
71+ configuration parameters with lower-case keys and string values. If
72+ *session_configuration* is ``None`` or empty, an empty dictionary is
73+ returned.
74+ """
75+
5576 if not session_configuration :
5677 return {}
5778
You can’t perform that action at this time.
0 commit comments