apache / apache/gluten

[VL] Handle multi-children Count in window expressions

Open
#12,255 0 comments 0 reactions 0 assignees View on GitHub
bug triage
Dominant language
Scala
Stars
1.6k
Forks
657
Avg merge
2d 14h
Merged PRs (30d)
80

Description

### Backend

VL (Velox)

### Bug description

Velox only supports count() / count(T) for window functions. Spark's
`count(c1, c2, ...)` variant must be rewritten into `count(if(or(isnull(c1),isnull(c2), ...), null, 1))` so the `WindowExec` can still be offloaded, which has already be handled in `AggregateExec`

### Gluten version

main branch

### Spark version

None

### Spark configurations

_No response_

### System information

_No response_

### Relevant logs

```bash

```

Contributor guide

Open the contributing guide

Research direction

Start by locating the WindowExec handling for count expressions and compare it with the existing AggregateExec handling described in the issue. Verify the multi-child count rewrite for null inputs and run the relevant window-function tests; done means Spark-style count(c1, c2, ...) can be offloaded to Velox.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend, data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.