From 3d92d37e33660a800e9bb4fdeb6102ad21631c7d Mon Sep 17 00:00:00 2001 From: Jose Venegas Vega Date: Thu, 23 Nov 2023 11:46:05 -0600 Subject: [PATCH] SCT-7633 Adding com.snowflake.snowpark.Session.SessionBuilder.GetOrCreate --- src/main/java/com/snowflake/snowpark_java/SessionBuilder.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/snowflake/snowpark_java/SessionBuilder.java b/src/main/java/com/snowflake/snowpark_java/SessionBuilder.java index 210a426e..e9675a34 100644 --- a/src/main/java/com/snowflake/snowpark_java/SessionBuilder.java +++ b/src/main/java/com/snowflake/snowpark_java/SessionBuilder.java @@ -78,6 +78,9 @@ public Session create() { * @since 1.10.0 */ public Session getOrCreate() { + // disable closure cleaner in Java session, + // it only works with Scala UDF. + this.builder.config("snowpark_enable_closure_cleaner", "never"); return new Session(this.builder.getOrCreate()); } }