Skip to content

Commit

Permalink
upgrade to scala 2.12.18
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-bli committed Nov 1, 2023
1 parent c8a0e60 commit 0589f10
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.12.11</scala.version>
<scala.version>2.12.18</scala.version>
<scala.compat.version>2.12</scala.compat.version>
<spec2.version>4.2.0</spec2.version>
<snowflake.jdbc.version>3.14.1</snowflake.jdbc.version>
Expand Down
13 changes: 6 additions & 7 deletions src/main/java/com/snowflake/snowpark_java/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()));
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/com/snowflake/snowpark/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0589f10

Please sign in to comment.