From e13b30accd874416bad92355f2d727dc0b630e57 Mon Sep 17 00:00:00 2001 From: Yun Zou Date: Wed, 7 Aug 2024 11:33:51 -0700 Subject: [PATCH] [SNOW-1616087] Use copy instead of deepcopy during query generation (#2041) --- src/snowflake/snowpark/_internal/compiler/query_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snowflake/snowpark/_internal/compiler/query_generator.py b/src/snowflake/snowpark/_internal/compiler/query_generator.py index 44b76052e4a..36eb51d4eb5 100644 --- a/src/snowflake/snowpark/_internal/compiler/query_generator.py +++ b/src/snowflake/snowpark/_internal/compiler/query_generator.py @@ -133,7 +133,7 @@ def do_resolve_with_resolved_children( ) # update the resolved child - copied_resolved_child = copy.deepcopy(resolved_child) + copied_resolved_child = copy.copy(resolved_child) final_queries = get_snowflake_plan_queries( copied_resolved_child, self.resolved_with_query_block ) @@ -173,7 +173,7 @@ def do_resolve_with_resolved_children( # the with definition must be generated before create, update, delete, merge and copy into # query. resolved_child = resolved_children[logical_plan.children[0]] - copied_resolved_child = copy.deepcopy(resolved_child) + copied_resolved_child = copy.copy(resolved_child) final_queries = get_snowflake_plan_queries( copied_resolved_child, self.resolved_with_query_block )