Skip to content

Commit

Permalink
support array_join
Browse files Browse the repository at this point in the history
  • Loading branch information
majian4work committed Aug 10, 2023
1 parent 805dab0 commit cec2082
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,14 @@ object ExpressionConverter extends SQLConfHelper with Logging {
substraitExprName.get,
replaceWithExpressionTransformer(arrayMin.child, attributeSeq),
arrayMin)
case arrayJoin: ArrayJoin =>
val children =
arrayJoin.children.map(child => replaceWithExpressionTransformer(child, attributeSeq))
new BasicCollectionOperationTransfomer(
substraitExprName.get,
children,
arrayJoin
)
case mapKeys: MapKeys =>
new UnaryArgumentCollectionOperationTransformer(
substraitExprName.get,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ object ExpressionMappings {
Sig[ArrayContains](ARRAY_CONTAINS),
Sig[ArrayMax](ARRAY_MAX),
Sig[ArrayMin](ARRAY_MIN),
Sig[ArrayJoin](ARRAY_JOIN),
Sig[SortArray](SORT_ARRAY),
Sig[ArraysOverlap](ARRAYS_OVERLAP),
Sig[ArrayPosition](ARRAY_POSITION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ object ExpressionNames {
final val ARRAY_CONTAINS = "array_contains"
final val ARRAY_MAX = "array_max"
final val ARRAY_MIN = "array_min"
final val ARRAY_JOIN = "array_join"
final val SORT_ARRAY = "sort_array"
final val ARRAYS_OVERLAP = "arrays_overlap"
final val ARRAY_POSITION = "array_position"
Expand Down

0 comments on commit cec2082

Please sign in to comment.