Skip to content

Commit bb3a3be

Browse files
SNOW-2049599 Avoid accidentally sending dataframe AST if has been disabled (#3377)
1 parent d2edd1c commit bb3a3be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/snowflake/snowpark/_internal/server_connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
create_rlock,
5858
create_thread_local,
5959
escape_quotes,
60+
is_ast_enabled,
6061
get_application_name,
6162
get_version,
6263
is_in_stored_procedure,
@@ -430,7 +431,7 @@ def execute_and_notify_query_listener(
430431
self, query: str, **kwargs: Any
431432
) -> SnowflakeCursor:
432433
notify_kwargs = {}
433-
if DATAFRAME_AST_PARAMETER in kwargs:
434+
if DATAFRAME_AST_PARAMETER in kwargs and is_ast_enabled():
434435
notify_kwargs["dataframeAst"] = kwargs[DATAFRAME_AST_PARAMETER]
435436

436437
try:

0 commit comments

Comments
 (0)