From 3179e0b6b0ec25694eaf491ac9c99c27332a101c Mon Sep 17 00:00:00 2001 From: "shyamala.jayabalan" Date: Tue, 20 Aug 2024 17:25:23 -0400 Subject: [PATCH] modified comments and test cases --- .../java/com/snowflake/snowpark_java/Functions.java | 12 ------------ .../scala/com/snowflake/snowpark/functions.scala | 11 ----------- .../snowflake/snowpark_test/JavaFunctionSuite.java | 5 ----- .../com/snowflake/snowpark_test/FunctionSuite.scala | 7 ++----- 4 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/main/java/com/snowflake/snowpark_java/Functions.java b/src/main/java/com/snowflake/snowpark_java/Functions.java index 0bf44a2e..f0aa6288 100644 --- a/src/main/java/com/snowflake/snowpark_java/Functions.java +++ b/src/main/java/com/snowflake/snowpark_java/Functions.java @@ -3925,18 +3925,6 @@ public static Column isnull(Column c) { return new Column(com.snowflake.snowpark.functions.isnull(c.toScalaColumn())); } - /** - * Wrapper for Snowflake built-in conv function. Convert number with from and to base. - * - * @since 1.14.0 - * @param c Column to be converted. - * @param fromBase Column from base format. - * @param toBase Column to base format. - * @return Column object. - */ - public static Column conv(Column c, Integer fromBase, Integer toBase) { - return new Column(com.snowflake.snowpark.functions.conv(c.toScalaColumn(), fromBase, toBase)); - } /** * Returns the current Unix timestamp (in seconds) as a long. Extracts a specified date or time * portion from a date, time, or timestamp. All calls of `unix_timestamp` within the same query diff --git a/src/main/scala/com/snowflake/snowpark/functions.scala b/src/main/scala/com/snowflake/snowpark/functions.scala index 8fe1ff83..da284055 100644 --- a/src/main/scala/com/snowflake/snowpark/functions.scala +++ b/src/main/scala/com/snowflake/snowpark/functions.scala @@ -3176,17 +3176,6 @@ object functions { */ def isnull(c: Column): Column = is_null(c) - /** - * Wrapper for Snowflake built-in conv function. Convert number with from and to base. - * @since 1.14.0 - * @param c Column to be converted. - * @param fromBase Column from base format. - * @param toBase Column to base format. - * @return Column object. - */ - def conv(c: Column, fromBase: Int, toBase: Int): Column = - callBuiltin("conv", c, fromBase, toBase) - /** * Returns the current Unix timestamp (in seconds) as a long. * Extracts a specified date or time portion from a date, time, or timestamp. diff --git a/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java b/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java index 8c5310fc..edd3dff8 100644 --- a/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java +++ b/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java @@ -2778,11 +2778,6 @@ public void isnull() { checkAnswer(df.select(Functions.isnull(df.col("a"))), expected, false); } - public void conv() { - DataFrame df = getSession().sql("select * from values('010101') as t(a)"); - checkAnswer(df.select(Functions.conv(df.col("a"), 2, 16)), new Row[] {Row.create("15")}, false); - } - public void unix_timestamp() { DataFrame df = getSession().sql("select * from values('2024-04-08T23:39:20.123-07:00') as t(a)"); diff --git a/src/test/scala/com/snowflake/snowpark_test/FunctionSuite.scala b/src/test/scala/com/snowflake/snowpark_test/FunctionSuite.scala index 859fc189..5929f053 100644 --- a/src/test/scala/com/snowflake/snowpark_test/FunctionSuite.scala +++ b/src/test/scala/com/snowflake/snowpark_test/FunctionSuite.scala @@ -2185,12 +2185,9 @@ trait FunctionSuite extends TestData { test("isnull") { val data = Seq("1", null).toDF("a") - checkAnswer(data.select(isnull(col("a"))), Seq(Row(true, false)), sort = false) - } - test("conv") { - val data = Seq("010101").toDF("a") - checkAnswer(data.select(conv(col("a"), 2, 16)), Seq(Row("15")), sort = false) + checkAnswer(data.select(isnull(col("a"))), Seq(Row(true), Row(false)), sort = false) } + test("unix_timestamp") { val data = Seq("2024-04-08T23:39:20.123-07:00").toDF("a") checkAnswer(data.select(unix_timestamp(col("a"))), Seq(Row("1712619560123")), sort = false)