ShreyeshArangath commented on code in PR #1596:
URL: https://github.com/apache/auron/pull/1596#discussion_r2550643482
##########
spark-extension-shims-spark/src/test/scala/org/apache/spark/sql/auron/AuronFunctionSuite.scala:
##########
@@ -498,42 +500,51 @@ class AuronFunctionSuite
}
}
- test("test function IsNaN") {
- withTable("t1") {
- sql(
- "create table test_is_nan using parquet as select cast('NaN' as
double) as c1, cast('NaN' as float) as c2, log(-3) as c3, cast(null as double)
as c4, 5.5f as c5")
- val functions =
- """
- |select
- | isnan(c1),
- | isnan(c2),
- | isnan(c3),
- | isnan(c4),
- | isnan(c5)
- |from
- | test_is_nan
+ ignore("DISABLED: isNaN native semantics mismatch (null -> false)") {
+ /* TODO: enable once Spark-compatible isNaN lands
https://github.com/apache/auron/issues/1646 */
+
+ test("test function IsNaN") {
+ withTable("t1") {
+ sql(
+ "create table test_is_nan using parquet as select cast('NaN' as
double) as c1, cast('NaN' as float) as c2, log(-3) as c3, cast(null as double)
as c4, 5.5f as c5")
+ val functions =
+ """
+ |select
+ | isnan(c1),
+ | isnan(c2),
+ | isnan(c3),
+ | isnan(c4),
+ | isnan(c5)
+ |from
+ | test_is_nan
""".stripMargin
- val df = sql(functions)
- df.show()
- checkAnswer(df, Seq(Row(true, true, false, false, false)))
+ val df = sql(functions)
+ df.show()
+ checkAnswer(df, Seq(Row(true, true, false, false, false)))
+ }
}
}
test("test function nvl2") {
withTable("t1") {
- sql(
- "create table t1 using parquet as select 'base'" +
- " as base, 3 as exponent")
- val functions =
- """
- |select
- | nvl2(null, base, exponent), nvl2(4, base, exponent)
- |from t1
- """.stripMargin
-
- val df = sql(functions)
- checkAnswer(df, Seq(Row("base", 3)))
+ sql(s"""CREATE TABLE t1 USING PARQUET AS SELECT
Review Comment:
Borrowed from https://github.com/apache/auron/pull/1635
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]