Skip to content

refactor(native): Add VeloxPlanValidator to consolidate plan validation logic#27275

Open
pramodsatya wants to merge 1 commit intoprestodb:masterfrom
pramodsatya:plan_checker_refactor
Open

refactor(native): Add VeloxPlanValidator to consolidate plan validation logic#27275
pramodsatya wants to merge 1 commit intoprestodb:masterfrom
pramodsatya:plan_checker_refactor

Conversation

@pramodsatya
Copy link
Copy Markdown
Contributor

@pramodsatya pramodsatya commented Mar 6, 2026

Description

Refactors Velox plan validation around a dedicated VeloxPlanChecker and moves plan conversion/checking code into presto_cpp/main/plan. Consolidates plan validation into the checker, removing the standalone plan validator, and validates Velox plan nodes during conversion so unsupported plans fail early on the validation path.

Motivation and Context

This refactoring simplifies the existing checks on Velox plan nodes, including via the sidecar, in order to enable Velox-cuDF plan node validation (see #27273). Instead of plan validation responsibilities split across plan conversion and a separate plan validator, Velox plan node validity is now checked during plan conversion with a unified VeloxPlanChecker. The VeloxPlanChecker will be leveraged by the sidecar's plan validation endpoint and by the existing Presto to Velox query plan conversion path.

To ensure plan node validation is fail-fast and comprehensive, checks now happen as individual Velox plan nodes are constructed from Presto plan fragments. This catches unsupported plans earlier while preserving the normal plan conversion flow (used in execution path).

Impact

  • Moves plan conversion/checking files from presto_cpp/main/types to presto_cpp/main/plan
  • Renames VeloxPlanConversion to VeloxPlanChecker
  • Removes standalone VeloxPlanValidator and folds its logic into VeloxPlanChecker
  • Makes VeloxPlanChecker a PrestoServer member so sidecar can use leverage plan checker functionality
  • Adds a generic isValidPlanNode(...) API in VeloxPlanChecker to support custom plan node validations
  • Keeps default plan node conversion behavior unchanged; stricter checks apply only in plan validation flow

Test Plan

A lightweight pass-through plan validator is added to plan conversion logic so existing plan node conversion is not impacted. Validation-only conversion path will be exercised by sidecar via v1/velox/plan endpoint.

Release Notes

== NO RELEASE NOTE ==

Summary by Sourcery

Introduce a dedicated VeloxPlanChecker and integrate validation into Presto-to-Velox plan conversion while restructuring plan-related code into a new plan module.

Enhancements:

  • Replace the legacy VeloxPlanValidator and standalone plan conversion helper with a unified VeloxPlanChecker that owns Presto-to-Velox plan validation.
  • Add a PlanConversionPurpose flag and per-node validation hook in PrestoToVeloxQueryPlan so that plan nodes are checked as they are built during validation-only conversions.
  • Introduce configurable rejection of plans containing nested loop joins and apply this check both in the task path and the sidecar plan validation endpoint.
  • Refactor plan conversion code from the types module into a dedicated plan library and update includes, linkages, and tests to depend on the new plan component.
  • Make VeloxPlanChecker a PrestoServer-owned component and plumb it through TaskResource and the /v1/velox/plan sidecar endpoint for centralized plan checking.

Summary by Sourcery

Introduce a VeloxPlanChecker and integrate Velox plan validation into Presto-to-Velox plan conversion while restructuring plan-related code into a dedicated plan library.

New Features:

  • Add a VeloxPlanChecker that validates Presto plan fragments during conversion to Velox plans and provides a generic isValidPlanNode API with specialized handling for nested loop joins.

Enhancements:

  • Integrate node-level validation into PrestoToVeloxQueryPlan via a validateNode helper and a validatePlan flag so unsupported plan nodes fail during conversion rather than in a separate validator.
  • Refactor plan conversion and validation code from the types module into a new plan module and link it through a presto_plan library used by server, tools, and tests.
  • Simplify PrestoServer and TaskResource by removing the VeloxPlanValidator lifecycle and relying on VeloxPlanChecker for both task execution and sidecar validation endpoints.

Build:

  • Add a presto_plan library for plan conversion/validation, remove the legacy presto_velox_plan_conversion object target, and update CMake dependencies and test targets to link against the new library.

Tests:

  • Update test binaries to include the new presto_plan dependency and use the relocated PrestoToVeloxQueryPlan interfaces.

@pramodsatya pramodsatya requested a review from majetideepak March 6, 2026 04:59
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Mar 6, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Mar 6, 2026

Reviewer's Guide

Refactors Presto-to-Velox plan handling into a dedicated presto_cpp/main/plan module, introduces a VeloxPlanChecker that validates plan nodes during conversion (with configurable rejection of nested loop joins), wires this into PrestoServer and TaskResource, and removes the old VeloxPlanValidator/VeloxPlanConversion plumbing and associated build wiring.

Sequence diagram for Velox plan validation via sidecar endpoint

sequenceDiagram
  actor Client
  participant HttpServer
  participant PrestoServer
  participant VeloxPlanChecker
  participant VeloxInteractiveQueryPlanConverter as Converter
  participant VeloxQueryPlanConverterBase as BaseConverter

  Client->>HttpServer: POST v1/velox/plan(planFragmentJson)
  HttpServer->>PrestoServer: handlePlanValidationRequest(planFragmentJson)

  PrestoServer->>VeloxPlanChecker: checkPlanFragment(planFragmentJson, nativeWorkerPool)
  activate VeloxPlanChecker
  VeloxPlanChecker->>VeloxPlanChecker: parse planFragmentJson to PlanFragment
  VeloxPlanChecker->>Converter: construct(queryCtx, pool)
  VeloxPlanChecker->>Converter: toVeloxQueryPlan(fragment, tableWriteInfo, taskId, validatePlan=true)
  activate Converter
  Converter->>BaseConverter: toVeloxQueryPlan(fragment, tableWriteInfo, taskId, validatePlan=true)
  activate BaseConverter
  BaseConverter->>BaseConverter: set validatePlan_ = true

  loop for each Presto plan node
    BaseConverter->>BaseConverter: build corresponding Velox PlanNode
    BaseConverter->>BaseConverter: validateNode(node)
    alt validatePlan_ is true
      BaseConverter->>VeloxPlanChecker: isValidPlanNode(node)
      alt node is NestedLoopJoinNode and failOnNestedLoopJoin
        VeloxPlanChecker-->>BaseConverter: false
        BaseConverter-->>Converter: throw VeloxException
        Converter-->>VeloxPlanChecker: propagate VeloxException
        VeloxPlanChecker-->>PrestoServer: PlanConversionResponse with failures
      else plan node supported
        VeloxPlanChecker-->>BaseConverter: true
        BaseConverter-->>BaseConverter: return node
      end
    else validatePlan_ is false
      BaseConverter-->>BaseConverter: return node without checks
    end
  end

  deactivate BaseConverter
  deactivate Converter

  VeloxPlanChecker-->>PrestoServer: PlanConversionResponse success
  deactivate VeloxPlanChecker

  PrestoServer-->>HttpServer: HTTP 200 with response JSON
  HttpServer-->>Client: HTTP 200 or 400 based on failures
Loading

Class diagram for VeloxPlanChecker and VeloxQueryPlanConverter integration

classDiagram
  class VeloxPlanChecker {
    +static PlanConversionResponse checkPlanFragment(planFragmentJson, pool)
    +bool isValidPlanNode(node~NestedLoopJoinNode~) const
    +bool isValidPlanNode(node~T~) const
  }

  class VeloxQueryPlanConverterBase {
    <<abstract>>
    +VeloxQueryPlanConverterBase(queryCtx, pool)
    +PlanFragment toVeloxQueryPlan(fragment, tableWriteInfo, taskId, validatePlan=false)
    +PlanNodePtr toVeloxQueryPlan(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanOutputNode(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanJoinNode(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanAggregationNode(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanLimitNode(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanWindowNode(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanTableWriteNode(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanExchangeNode(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanValuesNode(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanTableScanNode(node, tableWriteInfo, taskId)
    +VectorPtr evaluateConstantExpression(expression, type)
    +ColumnStatsSpecPtr toColumnStatsSpec(node, tableWriteInfo, taskId)
    +PlanNodePtr toVeloxQueryPlanOutputFragment(fragment, tableWriteInfo, taskId)
    +RowTypePtr toRowType(variables, typeParser)
    +vector~FieldAccessTypedExprPtr~ toVeloxExprs(variables)
    +void toAggregations(outputVariables, aggregationMap, aggregates, aggregateNames)
    +shared_ptr~T~ validateNode(node)
    -MemoryPool* pool_
    -QueryCtx* queryCtx_
    -VeloxExprConverter exprConverter_
    -TypeParser typeParser_
    -bool validatePlan_
    -VeloxPlanChecker veloxPlanChecker_
  }

  class VeloxInteractiveQueryPlanConverter {
    +VeloxInteractiveQueryPlanConverter(queryCtx, pool)
    +PlanFragment toVeloxQueryPlan(fragment, tableWriteInfo, taskId, validatePlan=false)
    +PlanNodePtr toVeloxQueryPlanExchangeNode(node, tableWriteInfo, taskId)
    +CommitStrategy getCommitStrategy() const
  }

  class VeloxBatchQueryPlanConverter {
    +VeloxBatchQueryPlanConverter(queryCtx, pool, shuffleName, broadcastBasePath, shuffleWriteInfo)
    +PlanFragment toVeloxQueryPlan(fragment, tableWriteInfo, taskId, validatePlan=false)
    +PlanNodePtr toVeloxQueryPlanExchangeNode(node, tableWriteInfo, taskId)
    +CommitStrategy getCommitStrategy() const
    -optional~string~ broadcastBasePath_
    -optional~SerializedShuffleWriteInfo~ serializedShuffleWriteInfo_
    -string shuffleName_
  }

  VeloxQueryPlanConverterBase <|-- VeloxInteractiveQueryPlanConverter
  VeloxQueryPlanConverterBase <|-- VeloxBatchQueryPlanConverter
  VeloxQueryPlanConverterBase --> VeloxPlanChecker : composition
  VeloxPlanChecker ..> NestedLoopJoinNode : validates
Loading

File-Level Changes

Change Details Files
Validate Velox plan nodes during Presto-to-Velox conversion via a new VeloxPlanChecker and validateNode hook, including optional rejection of NestedLoopJoinNode.
  • Add VeloxPlanChecker class with checkPlanFragment API and isValidPlanNode template plus NestedLoopJoinNode specialization controlled by SystemConfig::kPlanValidatorFailOnNestedLoopJoin.
  • Extend VeloxQueryPlanConverterBase and derived converters to accept a validatePlan flag, track it via a member, and wrap new PlanNode construction in a validateNode() helper that invokes VeloxPlanChecker when validation is enabled.
  • Update TaskResource and TaskManager paths to pass validatePlan=true for interactive conversions and false for batch task creation, ensuring validation happens only on the desired code paths.
presto_cpp/main/plan/VeloxPlanChecker.h
presto_cpp/main/plan/VeloxPlanChecker.cpp
presto_cpp/main/plan/PrestoToVeloxQueryPlan.h
presto_cpp/main/plan/PrestoToVeloxQueryPlan.cpp
presto_cpp/main/TaskResource.cpp
Replace the old VeloxPlanValidator/VeloxPlanConversion sidecar flow with VeloxPlanChecker::checkPlanFragment and simplify PrestoServer and TaskResource ownership.
  • Remove VeloxPlanValidator class and the presto_velox_plan_conversion object library, along with PrestoServer::initVeloxPlanValidator and planValidator_ member.
  • Update PrestoServer sidecar /v1/velox/plan endpoint to call VeloxPlanChecker::checkPlanFragment using the native worker pool and stop threading a validator into TaskResource.
  • Simplify TaskResource constructor to drop the validator parameter and remove explicit validatePlanFragment calls; rely on validatePlan flag in converters instead.
presto_cpp/main/plan/VeloxPlanChecker.h
presto_cpp/main/plan/VeloxPlanChecker.cpp
presto_cpp/main/PrestoServer.cpp
presto_cpp/main/PrestoServer.h
presto_cpp/main/TaskResource.h
presto_cpp/main/TaskResource.cpp
presto_cpp/main/types/VeloxPlanValidator.h
presto_cpp/main/types/VeloxPlanValidator.cpp
presto_cpp/main/types/VeloxPlanConversion.h
presto_cpp/main/types/VeloxPlanConversion.cpp
presto_cpp/main/types/CMakeLists.txt
Restructure plan-related code into a new presto_plan library and update include paths and linkage across the codebase and tests.
  • Move PrestoToVeloxQueryPlan.* and VeloxPlanChecker.* into a new presto_cpp/main/plan submodule and create a presto_plan CMake target that owns plan conversion/checking logic.
  • Adjust headers and includes throughout server, operators, tools, and tests to reference presto_cpp/main/plan/PrestoToVeloxQueryPlan.h instead of the previous types path.
  • Link presto_plan into presto_server_lib, various test binaries, operator tests, and trace tools to replace dependencies on presto_velox_plan_conversion or the old types-based plan converter.
presto_cpp/main/plan/CMakeLists.txt
presto_cpp/main/CMakeLists.txt
presto_cpp/main/types/CMakeLists.txt
presto_cpp/main/types/tests/CMakeLists.txt
presto_cpp/main/operators/tests/CMakeLists.txt
presto_cpp/main/tool/trace/CMakeLists.txt
presto_cpp/main/PrestoServer.cpp
presto_cpp/main/operators/tests/PlanNodeSerdeTest.cpp
presto_cpp/main/tool/trace/TraceReplayerMain.cpp
presto_cpp/main/types/tests/PlanConverterTest.cpp
presto_cpp/main/types/tests/PrestoToVeloxQueryPlanTest.cpp
presto_cpp/main/types/tests/ValuesPipeTest.cpp
presto_cpp/main/tests/TaskManagerTest.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

@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch 2 times, most recently from 2abde52 to a6797d1 Compare March 6, 2026 15:41
@pramodsatya pramodsatya marked this pull request as ready for review March 6, 2026 15:58
@pramodsatya pramodsatya requested review from a team as code owners March 6, 2026 15:58
@prestodb-ci prestodb-ci requested review from a team, bibith4 and wanglinsong and removed request for a team March 6, 2026 15:58
@pramodsatya
Copy link
Copy Markdown
Contributor Author

@majetideepak, could you please review this change?

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:

  • Consider moving PlanConversionPurpose into its own small header (e.g., PlanConversionPurpose.h) to avoid coupling converters, validators, and sidecar conversion helpers via VeloxPlanConversion.h and reduce the risk of circular dependencies as these components evolve.
  • You can simplify the constructors of VeloxInteractiveQueryPlanConverter and VeloxBatchQueryPlanConverter by dropping the default value for purpose there and relying on the default in VeloxQueryPlanConverterBase, which avoids duplicating the default and keeps the API surface slightly cleaner.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider moving `PlanConversionPurpose` into its own small header (e.g., `PlanConversionPurpose.h`) to avoid coupling converters, validators, and sidecar conversion helpers via `VeloxPlanConversion.h` and reduce the risk of circular dependencies as these components evolve.
- You can simplify the constructors of `VeloxInteractiveQueryPlanConverter` and `VeloxBatchQueryPlanConverter` by dropping the default value for `purpose` there and relying on the default in `VeloxQueryPlanConverterBase`, which avoids duplicating the default and keeps the API surface slightly cleaner.

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.

@pramodsatya pramodsatya marked this pull request as draft March 6, 2026 20:40
@pramodsatya pramodsatya changed the title feat(native): Account for plan conversion purpose in VeloxQueryPlanConverter refactor(native): Add VeloxPlanChecker to consolidate plan validation logic Mar 6, 2026
@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch from a6797d1 to 8338ad1 Compare March 6, 2026 23:04
@pramodsatya pramodsatya requested a review from czentgr March 6, 2026 23:04
@pramodsatya pramodsatya marked this pull request as ready for review March 6, 2026 23:06
@prestodb-ci prestodb-ci requested a review from a team March 6, 2026 23:06
@pramodsatya
Copy link
Copy Markdown
Contributor Author

@czentgr, could you please help review this refactor? The cuDF plan checker will build upon this in #27273.

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 renaming from planValidator_ to planChecker_ in TaskResource appears incomplete (e.g., constructor initializer list still refers to planValidator_); update the member name and all usages consistently to avoid compilation errors.
  • In TaskResource (and related call sites), the constructor parameter is still named planValidator while the type/member are now VeloxPlanChecker/planChecker_; consider renaming the parameter to planChecker to keep the terminology consistent with the refactor and avoid confusion.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The renaming from `planValidator_` to `planChecker_` in `TaskResource` appears incomplete (e.g., constructor initializer list still refers to `planValidator_`); update the member name and all usages consistently to avoid compilation errors.
- In `TaskResource` (and related call sites), the constructor parameter is still named `planValidator` while the type/member are now `VeloxPlanChecker`/`planChecker_`; consider renaming the parameter to `planChecker` to keep the terminology consistent with the refactor and avoid confusion.

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.

@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch 2 times, most recently from 27be965 to 908b418 Compare March 9, 2026 19:21
@pramodsatya
Copy link
Copy Markdown
Contributor Author

@sourcery-ai review.

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 VeloxQueryPlanConverterBase::toVeloxQueryPlan(fragment, ..., bool validatePlan) setter-style use of the validatePlan_ member means the flag persists across calls; if a converter instance is ever reused, consider a scoped guard or passing the checker/flag through the call stack instead to avoid accidental leakage of validation state between conversions.
    • converter instance is not reused.
  • The new nested-loop-join rejection is wired only through the validation path (validatePlan_ == true); in TaskResource::createOrUpdateBatchTask you explicitly pass false, so batch tasks can still execute NestedLoopJoinNodes even when planValidatorFailOnNestedLoopJoin is set—double-check whether that matches the intent to apply this check “in the task path” as described in the PR.
    • createOrUpdateBatchTask does not validate plan nodes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `VeloxQueryPlanConverterBase::toVeloxQueryPlan(fragment, ..., bool validatePlan)` setter-style use of the `validatePlan_` member means the flag persists across calls; if a converter instance is ever reused, consider a scoped guard or passing the checker/flag through the call stack instead to avoid accidental leakage of validation state between conversions.
- The new nested-loop-join rejection is wired only through the validation path (`validatePlan_ == true`); in `TaskResource::createOrUpdateBatchTask` you explicitly pass `false`, so batch tasks can still execute `NestedLoopJoinNode`s even when `planValidatorFailOnNestedLoopJoin` is set—double-check whether that matches the intent to apply this check “in the task path” as described in the PR.

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.

@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch 2 times, most recently from 849364e to d7025e7 Compare March 10, 2026 17:55
@pramodsatya
Copy link
Copy Markdown
Contributor Author

@amitkdutta, @BryanCutler, could you please help review this refactor?

Copy link
Copy Markdown
Contributor

@BryanCutler BryanCutler left a comment

Choose a reason for hiding this comment

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

Thanks @pramodsatya , this looks like a good improvement to me. I just had a couple minor questions.

@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch from d7025e7 to 576e78f Compare March 10, 2026 22:55
BryanCutler
BryanCutler previously approved these changes Mar 11, 2026
Copy link
Copy Markdown
Contributor

@BryanCutler BryanCutler left a comment

Choose a reason for hiding this comment

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

LGTM

@pramodsatya
Copy link
Copy Markdown
Contributor Author

Thanks @BryanCutler. @majetideepak, could you please help review this refactor?

@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch 3 times, most recently from 3edf8b6 to f9f922a Compare March 12, 2026 20:52
@majetideepak
Copy link
Copy Markdown
Collaborator

@amitkdutta do you have any thoughts on this change?

@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch 2 times, most recently from 8088d94 to 9961a3f Compare March 25, 2026 15:58
@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch 2 times, most recently from 8449425 to d428323 Compare March 26, 2026 19:25
outputType,
toVeloxSerdeKind(partitioningScheme.encoding),
sourceNode);
validateNode(partitionedOutputNode.get());
Copy link
Copy Markdown
Collaborator

@majetideepak majetideepak Mar 30, 2026

Choose a reason for hiding this comment

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

Why not keep the old assignment and minimize the diff?

planFragment.planNode = core::PartitionedOutputNode::single(
...
)
validateNode(planFragment.planNode.get());

Copy link
Copy Markdown
Collaborator

@majetideepak majetideepak left a comment

Choose a reason for hiding this comment

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

Let's try to reduce the diff. Thanks!

@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch from d428323 to 4b099fd Compare March 31, 2026 23:42
@pramodsatya pramodsatya requested a review from majetideepak April 2, 2026 18:14
const protocol::TaskId& taskId) {
const protocol::TaskId& taskId,
bool validatePlan) {
veloxPlanChecker_ =
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will create a new VeloxPlanChecker for every call with validatePlan = true.
We likely want to keep initVeloxPlanValidator API in PrestoServer as is and push down a single instance to TaskResource. This can later be extended to allow other plan checkers.
Let's keep VeloxPlanValidator instead of VeloxPlanChecker.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion, updated accordingly. Could you PTAL?

@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch from 4b099fd to 9d3130f Compare April 8, 2026 03:07
@pramodsatya pramodsatya force-pushed the plan_checker_refactor branch from 9d3130f to 4b454cf Compare April 8, 2026 03:09
@pramodsatya pramodsatya changed the title refactor(native): Add VeloxPlanChecker to consolidate plan validation logic refactor(native): Add VeloxPlanValidator to consolidate plan validation logic Apr 8, 2026
@pramodsatya pramodsatya requested a review from majetideepak April 8, 2026 03:09
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.

4 participants