Skip to content

Conversation

@zhuqi-lucas
Copy link
Contributor

@zhuqi-lucas zhuqi-lucas commented Jul 28, 2025

Which issue does this PR close?

We added the new feature for support distinct operation for window, and added count support.

This PR is to add sum support.

Rationale for this change

We added the new feature for support distinct operation for window, and added count support.

This PR is to add sum support.

Also fix the typo in window.slt.

What changes are included in this PR?

Are these changes tested?

Yes, slt testing added.

Are there any user-facing changes?

New sum distinct feature supported.

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Jul 28, 2025
@zhuqi-lucas
Copy link
Contributor Author

We added the new feature for support distinct operation for window, and added count support already.

FYI @crepererum @alamb ,

this is the follow-up for

#16925

@zhuqi-lucas zhuqi-lucas changed the title Support distinct window for sum feat: Support distinct window for sum Jul 28, 2025
) AS distinct_count
FROM table_test_distinct_count
ODER BY k, time;
ORDER BY k, time;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, this is fix the typo here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Context: This came from #16887 and @zhuqi-lucas spotted my mistake in #16888.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @crepererum for quick review!

07)------------DataSourceExec: partitions=2, partition_sizes=[5, 4]


# Add testing for distinct sum
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the corresponding slt testing for this PR.

@zhuqi-lucas
Copy link
Contributor Author

zhuqi-lucas commented Jul 28, 2025

Same as the count, i will try to improve the performance as follow-ups, but it will after my PRs for the missing features.

@github-actions github-actions bot added the ffi Changes to the ffi crate label Jul 28, 2025
@crepererum crepererum merged commit 56394e0 into apache:main Jul 29, 2025
27 checks passed
Standing-Man pushed a commit to Standing-Man/datafusion that referenced this pull request Aug 4, 2025
* feat: support sum distinct for window

* fmt

* fmt

* fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ffi Changes to the ffi crate functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants