Skip to content

refactor: Deprecate the old cleanup aggregation node ctor APIs#26973

Merged
xiaoxmeng merged 1 commit intoprestodb:masterfrom
xiaoxmeng:export-D90807059
Jan 16, 2026
Merged

refactor: Deprecate the old cleanup aggregation node ctor APIs#26973
xiaoxmeng merged 1 commit intoprestodb:masterfrom
xiaoxmeng:export-D90807059

Conversation

@xiaoxmeng
Copy link
Copy Markdown
Contributor

@xiaoxmeng xiaoxmeng commented Jan 16, 2026

== NO RELEASE NOTE ==

Differential Revision: D90807059

@xiaoxmeng xiaoxmeng requested review from a team as code owners January 16, 2026 05:36
@prestodb-ci prestodb-ci added the from:Meta PR from Meta label Jan 16, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Jan 16, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds the new noGroupsSpanBatches boolean parameter to all remaining AggregationNode constructor callsites in PrestoToVeloxQueryPlan, keeping the old behavior by explicitly passing false.

Class diagram for updated AggregationNode constructor usage

classDiagram
  class VeloxQueryPlanConverterBase {
    +toColumnStatsSpec(variadicArgs): core::PlanNodePtr
    +toVeloxQueryPlan(node: protocol::PlanNodePtr, tableWriteInfo: TableWriteInfo, taskId: std::string): core::PlanNodePtr
  }

  class AggregationNode {
    +AggregationNode(id: core::PlanNodeId, step: core::AggregationNode::Step, groupingKeys: std::vector<std::string>, preGroupedKeys: std::vector<std::string>, aggregateNames: std::vector<std::string>, aggregates: std::vector<core::AggregationNode::Aggregate>, ignoreNullKeys: bool, noGroupsSpanBatches: bool, source: core::PlanNodePtr)
  }

  VeloxQueryPlanConverterBase --> AggregationNode : constructs
Loading

File-Level Changes

Change Details Files
Update AggregationNode constructor usages to include the new noGroupsSpanBatches flag while preserving existing semantics.
  • Extend toColumnStatsSpec aggregation node creation to pass noGroupsSpanBatches set to false.
  • Extend grouped aggregation node creation in toVeloxQueryPlan to pass noGroupsSpanBatches set to false for global aggregations.
  • Extend aggregation node creation for DISTINCT operations in toVeloxQueryPlan to pass noGroupsSpanBatches set to false.
presto-native-execution/presto_cpp/main/types/PrestoToVeloxQueryPlan.cpp

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

@xiaoxmeng xiaoxmeng changed the title [prestissimo]refactor: Deprecate the old cleanup aggregation node ctor APIs refactor: Deprecate the old cleanup aggregation node ctor APIs Jan 16, 2026
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 left some high level feedback:

  • You’ve hard-coded /*noGroupsSpanBatches=*/false at all call sites; if this flag has meaningful semantics, consider plumbing through a real value (or config/option) rather than always forcing false so the behavior doesn’t need more refactors later.
  • The repeated aggregation-node construction with a growing parameter list suggests it may be time to introduce a small builder or options struct to keep call sites readable and reduce the chance of argument-order mistakes as more flags are added.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- You’ve hard-coded `/*noGroupsSpanBatches=*/false` at all call sites; if this flag has meaningful semantics, consider plumbing through a real value (or config/option) rather than always forcing `false` so the behavior doesn’t need more refactors later.
- The repeated aggregation-node construction with a growing parameter list suggests it may be time to introduce a small builder or options struct to keep call sites readable and reduce the chance of argument-order mistakes as more flags are added.

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.

@xiaoxmeng xiaoxmeng merged commit 3f588e5 into prestodb:master Jan 16, 2026
145 of 150 checks passed
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.

3 participants