From 0589f10832d1fd1950f7b47aec89186e03274200 Mon Sep 17 00:00:00 2001 From: Bing Li Date: Wed, 1 Nov 2023 10:54:09 -0700 Subject: [PATCH] upgrade to scala 2.12.18 --- pom.xml | 2 +- .../java/com/snowflake/snowpark_java/Functions.java | 13 ++++++------- .../scala/com/snowflake/snowpark/functions.scala | 1 - .../snowflake/snowpark_test/JavaFunctionSuite.java | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index e4ba5598..3dfea3ea 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ 1.8 1.8 UTF-8 - 2.12.11 + 2.12.18 2.12 4.2.0 3.14.1 diff --git a/src/main/java/com/snowflake/snowpark_java/Functions.java b/src/main/java/com/snowflake/snowpark_java/Functions.java index 74cc39a8..1c2e12c7 100644 --- a/src/main/java/com/snowflake/snowpark_java/Functions.java +++ b/src/main/java/com/snowflake/snowpark_java/Functions.java @@ -2365,14 +2365,13 @@ public static Column regexp_count(Column strExpr, Column pattern) { */ public static Column regexp_replace(Column strExpr, Column pattern) { return new Column( - com.snowflake.snowpark.functions.regexp_replace( - strExpr.toScalaColumn(), pattern.toScalaColumn())); + com.snowflake.snowpark.functions.regexp_replace( + strExpr.toScalaColumn(), pattern.toScalaColumn())); } /** - * Returns the subject with the specified pattern (or all occurrences of the pattern) - * replaced by a replacement string. If no matches are found, returns the original - * subject. + * Returns the subject with the specified pattern (or all occurrences of the pattern) replaced by + * a replacement string. If no matches are found, returns the original subject. * * @param strExpr The input string * @param pattern The pattern @@ -2382,8 +2381,8 @@ public static Column regexp_replace(Column strExpr, Column pattern) { */ public static Column regexp_replace(Column strExpr, Column pattern, Column replacement) { return new Column( - com.snowflake.snowpark.functions.regexp_replace( - strExpr.toScalaColumn(), pattern.toScalaColumn(), replacement.toScalaColumn())); + com.snowflake.snowpark.functions.regexp_replace( + strExpr.toScalaColumn(), pattern.toScalaColumn(), replacement.toScalaColumn())); } /** diff --git a/src/main/scala/com/snowflake/snowpark/functions.scala b/src/main/scala/com/snowflake/snowpark/functions.scala index 49f38593..86ad1969 100644 --- a/src/main/scala/com/snowflake/snowpark/functions.scala +++ b/src/main/scala/com/snowflake/snowpark/functions.scala @@ -1817,7 +1817,6 @@ object functions { def regexp_replace(strExpr: Column, pattern: Column, replacement: Column): Column = builtin("regexp_replace")(strExpr, pattern, replacement) - /** * Removes all occurrences of a specified strExpr, * and optionally replaces them with replacement. diff --git a/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java b/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java index f74dc440..6e93454e 100644 --- a/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java +++ b/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java @@ -1457,7 +1457,7 @@ public void regexp_replace() { Column replacement = Functions.lit("ch"); Row[] expected1 = {Row.create("cht"), Row.create("chg"), Row.create("chuse")}; checkAnswer( - df.select(Functions.regexp_replace(df.col("a"), pattern, replacement)), expected1, false); + df.select(Functions.regexp_replace(df.col("a"), pattern, replacement)), expected1, false); } @Test