Skip to content

Commit

Permalink
Support concat function
Browse files Browse the repository at this point in the history
  • Loading branch information
Surbhi-Vijay committed Mar 24, 2024
1 parent dafb371 commit 4653a1e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ object CHExpressionUtil {
SPARK_PARTITION_ID -> DefaultValidator(),
URL_DECODE -> DefaultValidator(),
SKEWNESS -> DefaultValidator(),
BIT_LENGTH -> DefaultValidator()
BIT_LENGTH -> DefaultValidator(),
MAP_CONCAT -> DefaultValidator()
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -567,4 +567,14 @@ class VeloxFunctionsValidateSuite extends VeloxWholeStageTransformerSuite {
}
}

test("Test map_concat function") {
runQueryAndCompare("select map_concat(map(4, 6), map(7, 8))") {
checkOperatorMatch[ProjectExecTransformer]
}
runQueryAndCompare(
"select map_concat(map(l_returnflag, l_comment), map(l_shipmode, l_comment)) " +
"from lineitem limit 1") {
checkOperatorMatch[ProjectExecTransformer]
}
}
}
6 changes: 3 additions & 3 deletions docs/velox-backend-support-progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Gluten supports 199 functions. (Draw to right to see all data types)
| filter | filter | filter | | | | | | | | | | | | | | | | | | | | |
| flatten | flatten | | | | | | | | | | | | | | | | | | | | | |
| map | map | map | S | | | | | | | | | | | | | | | | | | | |
| map_concat | map_concat | | | | | | | | | | | | | | | | | | | | | |
| map_concat | map_concat | map_concat | S | | | | | | | | | | | | | | | | | | | |
| map_entries | map_entries | | | | | | | | | | | | | | | | | | | | | |
| map_filter | map_filter | map_filter | | | | | | | | | | | | | | | | | | | | |
| get_map_value | | element_at | S | | | | | | | | | | | | | | | | | S | | |
Expand Down Expand Up @@ -416,7 +416,7 @@ Gluten supports 199 functions. (Draw to right to see all data types)
| java_method | | | | | | | | | | | | | | | | | | | | | | |
| least | least | least | S | | | | | | S | S | S | S | S | | | | | | | | | |
| md5 | md5 | | S | | | S | | | | | | | | | | | | | | | | |
| monotonically_increasing_id | | | S | | | | | | | | | | | | | | | | | | | |
| monotonically_increasing_id | | | S | | | | | | | | | | | | | | | | | | | |
| nanvl | | | S | | | | | | | | | | | | | | | | | | | |
| nvl | | | | | | | | | | | | | | | | | | | | | | |
| nvl2 | | | | | | | | | | | | | | | | | | | | | | |
Expand All @@ -428,4 +428,4 @@ Gluten supports 199 functions. (Draw to right to see all data types)
| spark_partition_id | | | S | | | | | | | | | | | | | | | | | | | |
| stack | | | | | | | | | | | | | | | | | | | | | | |
| xxhash64 | xxhash64 | xxhash64 | | | | | | | | | | | | | | | | | | | | |
| uuid | uuid | uuid | S | | | | | | | | | | | | | | | | | | | |
| uuid | uuid | uuid | S | | | | | | | | | | | | | | | | | | | |
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ object ExpressionMappings {
Sig[MapFromArrays](MAP_FROM_ARRAYS),
Sig[MapEntries](MAP_ENTRIES),
Sig[StringToMap](STR_TO_MAP),
Sig[MapConcat](MAP_CONCAT),
// Struct functions
Sig[GetStructField](GET_STRUCT_FIELD),
Sig[CreateNamedStruct](NAMED_STRUCT),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ object ExpressionNames {
final val MAP_FROM_ARRAYS = "map_from_arrays"
final val MAP_ENTRIES = "map_entries"
final val STR_TO_MAP = "str_to_map"
final val MAP_CONCAT = "map_concat"

// struct functions
final val GET_STRUCT_FIELD = "get_struct_field"
Expand Down

0 comments on commit 4653a1e

Please sign in to comment.