Skip to content

[SPARK-47239][SQL] Support distinct window function#45349

Closed
zml1206 wants to merge 3 commits intoapache:masterfrom
zml1206:distinct_window_function
Closed

[SPARK-47239][SQL] Support distinct window function#45349
zml1206 wants to merge 3 commits intoapache:masterfrom
zml1206:distinct_window_function

Conversation

@zml1206
Copy link
Contributor

@zml1206 zml1206 commented Mar 1, 2024

What changes were proposed in this pull request?

Support distinct window function when window frame is entire partition frame or
growing frame.
For example,
entire partition frame:

select 
    a, 
    b, 
    count(distinct c) over (partition by a) as cc
from t

growing frame:

select 
    a, 
    b, 
    count(distinct c) over (partition by a order by b) as cc
from t

Why are the changes needed?

Distinct window function is a commonly used function and is supported by many SQL engines, such as hive, impala, clickhouse, and presto.

Does this PR introduce any user-facing change?

Yes, after this pr, can use dinctinct window function like hive.

How was this patch tested?

UT.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Mar 1, 2024
@zml1206
Copy link
Contributor Author

zml1206 commented Mar 5, 2024

cc @cloud-fan What do you think of this feature?

@github-actions
Copy link

github-actions bot commented Jul 8, 2024

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Jul 8, 2024
@github-actions github-actions bot closed this Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant