diff --git a/backends-velox/src/test/scala/io/glutenproject/execution/VeloxFunctionsValidateSuite.scala b/backends-velox/src/test/scala/io/glutenproject/execution/VeloxFunctionsValidateSuite.scala index ae4cdbbe82b4..587492ef346a 100644 --- a/backends-velox/src/test/scala/io/glutenproject/execution/VeloxFunctionsValidateSuite.scala +++ b/backends-velox/src/test/scala/io/glutenproject/execution/VeloxFunctionsValidateSuite.scala @@ -385,6 +385,46 @@ class VeloxFunctionsValidateSuite extends VeloxWholeStageTransformerSuite { } } + test("test map_keys function") { + withTempPath { + path => + Seq( + Map[Int, String](1 -> null, 2 -> "200"), + Map[Int, String](1 -> "100", 2 -> "200", 3 -> "300"), + null + ) + .toDF("i") + .write + .parquet(path.getCanonicalPath) + + spark.read.parquet(path.getCanonicalPath).createOrReplaceTempView("map_tbl") + + runQueryAndCompare("select map_keys(i) from map_tbl") { + checkOperatorMatch[ProjectExecTransformer] + } + } + } + + test("test map_values function") { + withTempPath { + path => + Seq( + Map[Int, String](1 -> null, 2 -> "200"), + Map[Int, String](1 -> "100", 2 -> "200", 3 -> "300"), + null + ) + .toDF("i") + .write + .parquet(path.getCanonicalPath) + + spark.read.parquet(path.getCanonicalPath).createOrReplaceTempView("map_tbl") + + runQueryAndCompare("select map_values(i) from map_tbl") { + checkOperatorMatch[ProjectExecTransformer] + } + } + } + test("Test isnan function") { runQueryAndCompare( "SELECT isnan(l_orderkey), isnan(cast('NaN' as double)), isnan(0.0F/0.0F)" + diff --git a/docs/velox-backend-support-progress.md b/docs/velox-backend-support-progress.md index a5fd0ae87cc9..f832d30663c1 100644 --- a/docs/velox-backend-support-progress.md +++ b/docs/velox-backend-support-progress.md @@ -282,8 +282,8 @@ Gluten supports 199 functions. (Draw to right to see all data types) | get_map_value | | element_at | S | | | | | | | | | | | | | | | | | S | | | | map_from_arrays | | map_from_arrays | S | | | | | | | | | | | | | | | | | S | | | | map_from_entries | map_from_entries | | | | | | | | | | | | | | | | | | | | | | -| map_keys | map_keys | | | | | | | | | | | | | | | | | | | | | | -| map_values | map_values | | S | | | | | | | | | | | | | | | | | S | | | +| map_keys | map_keys | map_keys | S | | | | | | | | | | | | | | | | | | | | +| map_values | map_values | map_values | S | | | | | | | | | | | | | | | | | S | | | | named_struct,struct | row_construct | named_struct | S | | | | | | | | | | | | | | | | | | S | | | posexplode_outer,posexplode | | | | | | | | | | | | | | | | | | | | | | | | sequence | | | | | | | | | | | | | | | | | | | | | | |