Skip to content

Commit

Permalink
Added testcases for cbrt and modified version
Browse files Browse the repository at this point in the history
Added test cases for cbrt
  • Loading branch information
sfc-gh-sjayabalan committed Aug 1, 2024
1 parent c2d83f4 commit b3f383c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/com/snowflake/snowpark/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3195,7 +3195,7 @@ object functions {

/**
* Used to calculate the cubic root of a number.
* @since 1.10.0
* @since 1.4.0
* @param column Column to calculate the cubic root.
* @return Column object.
*/
Expand All @@ -3205,7 +3205,7 @@ object functions {

/**
* Used to calculate the cubic root of a number. There were slight differences found:
* @since 1.10.0
* @since 1.4.0
* @param column Column to calculate the cubic root.
* @return Column object.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,14 @@ trait FunctionSuite extends TestData {
expected,
sort = false)
}

test("cbrt") {
val data = Seq(64.0, 27.0, 8.0).toDF("cbrt_a")
var expected = Seq(4.0,3.0,2.0)
checkAnswer(
data.select(cbrt(data("cbrt_a"))),
expected,
sort = false)
}
}

class EagerFunctionSuite extends FunctionSuite with EagerSession
Expand Down

0 comments on commit b3f383c

Please sign in to comment.