Skip to content

Commit

Permalink
Add in support for murmur3 hashing of structs
Browse files Browse the repository at this point in the history
Signed-off-by: Robert (Bobby) Evans <[email protected]>
  • Loading branch information
revans2 committed Mar 25, 2021
1 parent 53f6d20 commit 6c1562c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/supported_ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -9730,7 +9730,7 @@ Accelerator support is described below.
<td><b>NS</b></td>
<td><b>NS</b></td>
<td><b>NS</b></td>
<td><b>NS</b></td>
<td><em>PS* (missing nested BINARY, CALENDAR, ARRAY, MAP, UDT)</em></td>
<td><b>NS</b></td>
</tr>
<tr>
Expand Down
1 change: 1 addition & 0 deletions integration_tests/src/main/python/repart_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def test_repartion_df(num_parts, length):
([('a', decimal_gen_64bit)], ['a']),
([('a', string_gen)], ['a']),
([('a', null_gen)], ['a']),
([('a', StructGen([('c0', boolean_gen), ('c1', StructGen([('cc0', boolean_gen), ('cc1', string_gen)]))]))], ['a']),
([('a', byte_gen)], [f.col('a') - 5]),
([('a', long_gen)], [f.col('a') + 15]),
([('a', byte_gen), ('b', boolean_gen)], ['a', 'b']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ object GpuOverrides {
"Murmur3 hash operator",
ExprChecks.projectNotLambda(TypeSig.INT, TypeSig.INT,
repeatingParamCheck = Some(RepeatingParamCheck("input",
TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL,
(TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL + TypeSig.STRUCT).nested(),
TypeSig.all))),
(a, conf, p, r) => new ExprMeta[Murmur3Hash](a, conf, p, r) {
override val childExprs: Seq[BaseExprMeta[_]] = a.children
Expand Down Expand Up @@ -2484,7 +2484,8 @@ object GpuOverrides {
// TODO In 0.5 we should make the checks self documenting, and look more like what
// SparkPlan and Expression support
// https://github.com/NVIDIA/spark-rapids/issues/1915
val sig = TypeSig.commonCudfTypes + TypeSig.NULL + TypeSig.DECIMAL
val sig = (TypeSig.commonCudfTypes + TypeSig.NULL +
TypeSig.DECIMAL + TypeSig.STRUCT).nested()
hp.children.foreach { child =>
sig.tagExprParam(this, child, "hash_key")
}
Expand Down

0 comments on commit 6c1562c

Please sign in to comment.