Skip to content

feat(planner): Add feature config for PushPartialAggregationThroughJoin#27269

Merged
aaneja merged 2 commits intomasterfrom
addFeatureFlagForPushPartialAggregationThroughJoin
Mar 10, 2026
Merged

feat(planner): Add feature config for PushPartialAggregationThroughJoin#27269
aaneja merged 2 commits intomasterfrom
addFeatureFlagForPushPartialAggregationThroughJoin

Conversation

@aaneja
Copy link
Copy Markdown
Contributor

@aaneja aaneja commented Mar 5, 2026

Description, Motivation and Context

Adds a feature config for PushPartialAggregationThroughJoin; only a session property exists for it at the moment

Test Plan

CI

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

@aaneja aaneja requested review from a team, feilong-liu and jaystarshot as code owners March 5, 2026 17:04
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Mar 5, 2026
@prestodb-ci prestodb-ci requested review from a team, Joe-Abraham and namya28 and removed request for a team March 5, 2026 17:04
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Mar 5, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a configurable feature flag for pushing partial aggregations through joins and wires it into both FeaturesConfig and SystemSessionProperties, with corresponding defaults and property-mapping tests.

Class diagram for new PushPartialAggregationThroughJoin feature config

classDiagram
    class FeaturesConfig {
        - boolean pushAggregationThroughJoin
        - boolean pushPartialAggregationThroughJoin
        + boolean isPushAggregationThroughJoin()
        + FeaturesConfig setPushAggregationThroughJoin(boolean value)
        + boolean isPushPartialAggregationThroughJoin()
        + FeaturesConfig setPushPartialAggregationThroughJoin(boolean pushPartialAggregationThroughJoin)
    }

    class SystemSessionProperties {
        + SystemSessionProperties(FeaturesConfig featuresConfig)
        + void booleanProperty(String name, String description, boolean defaultValue, boolean hidden)
    }

    FeaturesConfig <.. SystemSessionProperties : uses
Loading

Flow diagram for resolving push partial aggregation through join config

flowchart LR
    A[Config file or default values] --> B[FeaturesConfig.setPushPartialAggregationThroughJoin]
    B --> C[FeaturesConfig.pushPartialAggregationThroughJoin]
    C --> D[SystemSessionProperties constructor]
    D --> E[booleanProperty for PUSH_PARTIAL_AGGREGATION_THROUGH_JOIN]
    E --> F[Session property default for push partial aggregation through join]
Loading

File-Level Changes

Change Details Files
Introduce FeaturesConfig flag and configuration binding for pushing partial aggregations through joins
  • Add pushPartialAggregationThroughJoin boolean field to FeaturesConfig with default false
  • Expose getter and @Config/@ConfigDescription-annotated setter for the new flag with key optimizer.push-partial-aggregation-through-join
  • Ensure setter returns FeaturesConfig for fluent configuration
presto-main-base/src/main/java/com/facebook/presto/sql/analyzer/FeaturesConfig.java
Update configuration tests to cover new optimizer.push-partial-aggregation-through-join property
  • Extend default FeaturesConfig expectations to include pushPartialAggregationThroughJoin defaulting to false
  • Add explicit property mapping for optimizer.push-partial-aggregation-through-join=true
  • Update expected FeaturesConfig instance in explicit mapping test to set pushPartialAggregationThroughJoin(true)
presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/TestFeaturesConfig.java
Wire session property default to the new FeaturesConfig flag
  • Change PUSH_PARTIAL_AGGREGATION_THROUGH_JOIN session property default from hardcoded false to featuresConfig.isPushPartialAggregationThroughJoin()
presto-main-base/src/main/java/com/facebook/presto/SystemSessionProperties.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 5, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@steveburnett
Copy link
Copy Markdown
Contributor

Please add documentation for the new configuration property.

@aaneja aaneja changed the title feat(config): Add feature config for PushPartialAggregationThroughJoin feat(planner): Add feature config for PushPartialAggregationThroughJoin Mar 9, 2026
Copy link
Copy Markdown
Contributor

@steveburnett steveburnett left a comment

Choose a reason for hiding this comment

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

LGTM! (docs)

Pull branch, local doc build, looks good. Thanks!

Copy link
Copy Markdown
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

Thanks @aaneja

@aaneja aaneja merged commit f9d87a2 into master Mar 10, 2026
93 of 95 checks passed
@aaneja aaneja deleted the addFeatureFlagForPushPartialAggregationThroughJoin branch March 10, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants