Skip to content

[presto-native-execution] Expose spill_io_stats_key_prefix as a session property (#27694)#27694

Open
mkarrmann wants to merge 1 commit intoprestodb:masterfrom
mkarrmann:export-D103308964
Open

[presto-native-execution] Expose spill_io_stats_key_prefix as a session property (#27694)#27694
mkarrmann wants to merge 1 commit intoprestodb:masterfrom
mkarrmann:export-D103308964

Conversation

@mkarrmann
Copy link
Copy Markdown
Contributor

@mkarrmann mkarrmann commented May 1, 2026

Summary:

Adds Presto session property in order to set the Spill IO stats suffix introduced in facebookincubator/velox#17390

Differential Revision: D103308964

@mkarrmann mkarrmann requested review from a team as code owners May 1, 2026 02:29
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 1, 2026

Reviewer's Guide

Adds a new native execution session property to control the suffix used for spill FileSystem IoStats keys, wiring it through session properties to QueryConfig so operators can disambiguate spill IoStats from connector IoStats in shared FileSystem deployments.

Class diagram for new spill IoStats suffix session property

classDiagram
    class SessionProperties {
        +SessionProperties()
        +addSessionProperty(name, description, type, isHidden, configKey, defaultValue)
        <<static>> const char* kSpillFileCreateConfig
        <<static>> const char* kSpillIoStatsKeySuffix
        <<static>> const char* kAggregationSpillFileCreateConfig
    }

    class QueryConfig {
        <<static>> const char* kSpillFileCreateConfig
        <<static>> const char* kSpillIoStatsKeySuffix
        +spillFileCreateConfig()
        +spillIoStatsKeySuffix()
    }

    SessionProperties ..> QueryConfig : uses
Loading

File-Level Changes

Change Details Files
Introduce a new native execution session property that exposes the spill IoStats key suffix configuration.
  • Define a new static session property key constant for the spill IoStats key suffix in the SessionProperties interface.
  • Register the new session property in the SessionProperties constructor, including description, type, default nullability, backing QueryConfig key, and getter.
  • Document the purpose of the property as disambiguating IoStats from spill vs connector backends when they share a FileSystem and key namespace.
presto-native-execution/presto_cpp/main/properties/session/SessionProperties.cpp
presto-native-execution/presto_cpp/main/properties/session/SessionProperties.h

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 left some high level feedback:

  • The descriptive text for kSpillIoStatsKeySuffix in SessionProperties.cpp and the header comment in SessionProperties.h are slightly divergent (e.g., mentioning runtimeStats vs. TableScan/TableWriter collisions); consider consolidating or aligning these to avoid future confusion about the primary purpose of the property.
  • Given this property is intended to avoid silent IoStats key collisions, consider explicitly documenting in the description what happens when the suffix is left empty in shared FileSystem deployments (e.g., collisions remain possible), so users understand the tradeoff of using the default.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The descriptive text for `kSpillIoStatsKeySuffix` in `SessionProperties.cpp` and the header comment in `SessionProperties.h` are slightly divergent (e.g., mentioning `runtimeStats` vs. `TableScan/TableWriter` collisions); consider consolidating or aligning these to avoid future confusion about the primary purpose of the property.
- Given this property is intended to avoid silent IoStats key collisions, consider explicitly documenting in the description what happens when the suffix is left empty in shared FileSystem deployments (e.g., collisions remain possible), so users understand the tradeoff of using the default.

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.

…on property (prestodb#27694)

Summary:

Adds Presto session property in order to set the Spill IO stats suffix introduced in facebookincubator/velox#17390

Differential Revision: D103308964
@meta-codesync meta-codesync Bot changed the title [presto-native-execution] Expose spill_io_stats_key_prefix as a session property [presto-native-execution] Expose spill_io_stats_key_prefix as a session property (#27694) May 1, 2026
@mkarrmann mkarrmann force-pushed the export-D103308964 branch from 04a51da to abfa23a Compare May 1, 2026 17:54
@steveburnett
Copy link
Copy Markdown
Contributor

  • Is spill_io_stats_key_prefix documented? If not, please add documentation.

  • Please edit the PR title to follow semantic commit style to pass the failing and required CI check. See the failure in the test for advice. If you can’t edit the PR title let us know and we can help.

  • Please add a release note - or NO RELEASE NOTE - following the Release Notes Guidelines to pass the failing but not required CI check.

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.

2 participants