forked from NVIDIA/spark-rapids
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
GpuMapConcat
support for nested-type values (NVIDIA#5686)
* support nested values Signed-off-by: remzi <13716567376yh@gmail.com> * rewrite GpuMapConcat Signed-off-by: remzi <13716567376yh@gmail.com> * update simplify shrink the test size Signed-off-by: remzi <13716567376yh@gmail.com> * add limit Signed-off-by: remzi <13716567376yh@gmail.com> * remove unused import Signed-off-by: remzi <13716567376yh@gmail.com> * fallback to CPU when key type is nested Signed-off-by: remzi <13716567376yh@gmail.com> * update docs Signed-off-by: remzi <13716567376yh@gmail.com> * add tests Signed-off-by: remzi <13716567376yh@gmail.com> * update comments Signed-off-by: remzi <13716567376yh@gmail.com>
- Loading branch information
1 parent
ed8fc87
commit 34c1761
Showing
7 changed files
with
77 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
tests/src/test/scala/com/nvidia/spark/rapids/CollectionOpSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.nvidia.spark.rapids | ||
|
||
import org.apache.spark.sql.functions.map_concat | ||
|
||
class CollectionOpSuite extends SparkQueryCompareTestSuite { | ||
testGpuFallback( | ||
"MapConcat with Array keys fall back", | ||
"ProjectExec", | ||
ArrayKeyMapDF, | ||
execsAllowedNonGpu = Seq("ProjectExec", "ShuffleExchangeExec")) { | ||
frame => { | ||
import frame.sparkSession.implicits._ | ||
frame.select(map_concat($"col1", $"col2")) | ||
} | ||
} | ||
|
||
testGpuFallback( | ||
"MapConcat with Struct keys fall back", | ||
"ProjectExec", | ||
StructKeyMapDF, | ||
execsAllowedNonGpu = Seq("ProjectExec", "ShuffleExchangeExec")) { | ||
frame => { | ||
import frame.sparkSession.implicits._ | ||
frame.select(map_concat($"col1", $"col2")) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters