Skip to content

[SPARK-53848][SQL] Add ability to support Alpha family in Theta Aggregates#55300

Open
karuppayya wants to merge 2 commits intoapache:masterfrom
karuppayya:SPARK-53848
Open

[SPARK-53848][SQL] Add ability to support Alpha family in Theta Aggregates#55300
karuppayya wants to merge 2 commits intoapache:masterfrom
karuppayya:SPARK-53848

Conversation

@karuppayya
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Adding ability to use ALPHA family for Theta Sketch
(Recreation of #52551 since it could not be re-opened)

Why are the changes needed?

Theta sketch aggregate currently supports only quick select.
Consumers like Iceberg will benefit from the sketch aggregate if has the ability to use ALPHA family
Iceberg specification to use ALPHA sketches
Custom implementation of theta sketch aggregates in Iceberg that can be replaced with Spark Theta aggregates

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit tests

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

No

@karuppayya
Copy link
Copy Markdown
Contributor Author

cc: @cboumalh @aokolnychyi

@HyukjinKwon HyukjinKwon changed the title [SPARK-53848] Add ability to support Alpha family in Theta Aggregates [SPARK-53848][SQL] Add ability to support Alpha family in Theta Aggregates Apr 12, 2026
// Constructors
private lazy val family: Family = {
if (!third.foldable) {
throw QueryExecutionErrors.thetaFamilyMustBeConstantError(prettyName)
Copy link
Copy Markdown
Contributor

@cboumalh cboumalh Apr 13, 2026

Choose a reason for hiding this comment

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

Ideally we can do this check at the analysis step in checkInputDataTypes to fail early, instead of at runtime. Same applies to the lgNomEntries. I can create a follow up, or we can make the modifications here if other reviewers see it fit.

@cboumalh
Copy link
Copy Markdown
Contributor

@karuppayya LGTM, thanks for the work.

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.

2 participants