Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SQL] support more features for window aggregates #1742

Merged
merged 1 commit into from
May 14, 2024

Conversation

mihaibudiu
Copy link
Collaborator

Is this a user-visible change (yes/no): almost

Fixes #459

This PR removes some limitations on the partitioned_window_aggregates supported:

  • we could not sort on nullable fields
  • we could only sort on integer fields
  • we could only sort ascending

We still have limitations, but these will be addressed in separate PRs.

The work involves adding a bunch of Rust code and traits:

  • traits to distinguish signed and unsigned types
  • traits to prevent partitioned_rolling_aggregate being instantiated with signed types
  • traits to help wrapping SQL types into unsigned types preserving order

@ryzhyk can you please review just the Rust part?

@mihaibudiu mihaibudiu force-pushed the partitioned_window branch 3 times, most recently from dccd7df to 136efa7 Compare May 11, 2024 02:10
crates/dbsp/src/algebra/mod.rs Outdated Show resolved Hide resolved
crates/dbsp/src/algebra/mod.rs Outdated Show resolved Hide resolved
crates/dbsp/src/operator/time_series/rolling_aggregate.rs Outdated Show resolved Hide resolved
sql-to-dbsp-compiler/lib/sqllib/src/aggregates.rs Outdated Show resolved Hide resolved
sql-to-dbsp-compiler/lib/sqllib/src/lib.rs Show resolved Hide resolved
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu mihaibudiu merged commit 561dd6d into main May 14, 2024
4 of 5 checks passed
@mihaibudiu mihaibudiu deleted the partitioned_window branch May 14, 2024 00:52
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.

partitioned_rolling_aggregate produces an incorrect result
2 participants