Skip to content

Add a registration mechanism to Aggregators - #30

Draft
devavret wants to merge 949 commits into
rapidsai:velox-cudffrom
devavret:register-aggs
Draft

Add a registration mechanism to Aggregators#30
devavret wants to merge 949 commits into
rapidsai:velox-cudffrom
devavret:register-aggs

Conversation

@devavret

Copy link
Copy Markdown

This is an effort in trying to make a registration mechanism for cudf's aggregation operator's equivalent of aggregation functions. Currently it only allows for registration of aggs already supported by cudf but with different names like presto prefixes and spark companion functions.

karthikeyann and others added 30 commits March 6, 2025 18:00
- Disabled gpu anti join.
- Disabled expression precompute
…-03-05

Update from Velox main (2025-03-05)
devavret and others added 29 commits May 5, 2025 07:42
Add debug utility function to print the cudf table
Before that, the count result is incorrect. For companion aggregate
function, the step of all the aggregates can be different,
facebookincubator#12830 (comment),
in this example, HashAggregate(keys=[],
functions=[merge_count(l_quantity#80), partial_count(distinct
l_partkey#77L)], output=[count#166L, count#169L]), so we cannot use a
single step for HashAggregation
```
the step is SINGLE the kind is sum_merge_extract
the step is SINGLE the kind is sum_merge_extract
the step is SINGLE the kind is count_merge_extract
add input 14count reduce stepSINGLE
count input 0: {11933.739999999998, -4828.52, 8}
1: {13683.73, -100.96000000000026, 6}
2: {7070.17, 289.63, 8}
3: {13205.7, -952.0400000000004, 8}
4: {7017.68, 4809.41, 5}
5: {129.12, -27.13000000000001, 2}
6: {23060.460000000003, 6369.129999999999, 10}
7: {15549.43, -6224.07, 8}
8: {8111.89, -14071.19, 4}
9: {12510.16, -309.84000000000106, 8}
10: {4638.43, -7112.44, 5}
11: {9982.08, -4268.39, 7}
12: {11483.15, 2080.0799999999995, 8}
13: {1447.4599999999998, -20.260000000000105, 3}
get the output 1
[14,139823.2,-24366.590000000004]                                               
Elapsed time: 4.389513118 seconds
```
…-2025-05-20

Update from Velox main (2025-05-20) to velox-cudf
feat(stats): add recordOutputStats to CudfLocalPartition
…acebookincubator#21)

Due to a bug in `cudfAdapter`, when local partition node is followed by
a non-cudf node, a `CudfToVelox` operator was **replacing** the
`LocalExchange` at the beginning of the post partition pipeline.

Before:
```
Operators before adapting for cuDF: count [4]
  Operator: ID 0: LocalExchange(0)
  Operator: ID 1: TopN[4] 1
  Operator: ID 2: PartitionedOutput[5] 2
  Operator: ID 3: CallbackSink[N/A] 3
Operators after adapting for cuDF: count [4]
  Operator: ID 0: CudfToVelox[3-to-velox] 0  <<<<======= LocalExchange removed!
  Operator: ID 1: TopN[4] 1
  Operator: ID 2: PartitionedOutput[5] 2
  Operator: ID 3: CallbackSink[N/A] 3
```

After
```
Operators before adapting for cuDF: count [4]
  Operator: ID 0: LocalExchange(0)
  Operator: ID 1: TopN[4] 1
  Operator: ID 2: PartitionedOutput[5] 2
  Operator: ID 3: CallbackSink[N/A] 3
Operators after adapting for cuDF: count [5]
  Operator: ID 0: LocalExchange(0)
  Operator: ID 1: CudfToVelox[3-to-velox] 1
  Operator: ID 2: TopN[4] 2
  Operator: ID 3: PartitionedOutput[5] 3
  Operator: ID 4: CallbackSink[N/A] 4
```
- change null equality to UNEQUAL
- handle empty input to build
- disable right joins (because design should be different)
- disable null aware anti join with filter (need to be implemented as
per https://facebookincubator.github.io/velox/develop/anti-join.html )
- Null aware anti join without filter works, and also normal anti join
with/without filter works
    null aware anti join
    NOT IN
    Subquery returns a row with a NULL: Empty result.
    Subquery returns no rows: All of left table.
Subquery returns one or more rows and no row has a NULL: left unmatched,
without nulls.

    anti join
    NOT EXISTS
    Subquery returns a row with a NULL: left unmatched, including nulls
(UNEQUAL). Subquery returns no rows: All of left table. Subquery returns
one
or more rows and no row has a NULL: left unmatched, including nulls
(UNEQUAL).

The null behavior is verified with JoinFuzzer. (velox_join_fuzzer)

---------

Co-authored-by: Karthikeyan Natarajan <karthikeyann@users.noreply.github.com>
This reverts commit 5fede81.
This reverts commit 344f9e7.
This reverts commit d2eebbd.
…ream-28-05-2025

Merge velox-cudf branch from upstream 28 05 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants