pedrumj2 commented on code in PR #12976:
URL: https://github.com/apache/gluten/pull/12976#discussion_r3974596187
##########
backends-velox/src/test/scala/org/apache/gluten/functions/ScalarFunctionsValidateSuite.scala:
##########
@@ -550,6 +550,37 @@ class ScalarFunctionsValidateSuite extends
FunctionsValidateSuite {
}
}
+ test("map_from_arrays offloads to Velox") {
+ runQueryAndCompare(
+ "select map_from_arrays(array(l_orderkey, l_orderkey + 1), " +
+ "array(l_partkey, l_suppkey)) from lineitem limit 10") {
+ checkGlutenPlan[ProjectExecTransformer]
+ }
+ }
+
+ test("map_from_arrays under LAST_WIN keeps the first position of a duplicate
key " +
+ "and its last value") {
+ withSQLConf(SQLConf.MAP_KEY_DEDUP_POLICY.key ->
SQLConf.MapKeyDedupPolicy.LAST_WIN.toString) {
+ runQueryAndCompare(
+ "select map_from_arrays(array(l_orderkey, l_orderkey + 1, l_orderkey),
" +
+ "array(l_partkey, l_suppkey, l_linenumber)) as m, " +
+ "map_keys(map_from_arrays(array(l_orderkey, l_orderkey + 1,
l_orderkey), " +
+ "array(l_partkey, l_suppkey, l_linenumber))) as k from lineitem
limit 10") {
+ checkGlutenPlan[ProjectExecTransformer]
+ }
+ }
+ }
+
+ test("map_from_arrays honors a lower-case mapKeyDedupPolicy value") {
+ withSQLConf(SQLConf.MAP_KEY_DEDUP_POLICY.key -> "last_win") {
Review Comment:
@philo-he I see thanks for sharing that. I remove this test.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]