Skip to content

Conversation

zabetak
Copy link
Member

@zabetak zabetak commented Oct 7, 2025

What changes were proposed in this pull request?

  1. Extract PlanModifierForASTConv outside of ASTConverter and apply it explicitly in CalcitePlanner
  2. Inline getOptimizedAST since now it becomes a trivial call
  3. Remove unused variant of getOptimizedAST

Why are the changes needed?

  1. Display all PlanModifierForASTConv effects in EXPLAIN CBO output
  2. Improve diagnosability by getting the final CBO plan with all transformations

Does this PR introduce any user-facing change?

The output of EXPLAIN CBO changes slightly but there is no effect in correctness/performance cause the plan remains the same.

How was this patch tested?

Existing tests

Copy link

sonarqubecloud bot commented Oct 8, 2025

@zabetak zabetak marked this pull request as ready for review October 8, 2025 17:00
Copy link
Contributor

@thomasrebele thomasrebele left a comment

Choose a reason for hiding this comment

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

LGTM (non-binding)

POSTHOOK: type: QUERY
POSTHOOK: Input: default@alter_coltype
#### A masked pattern was here ####
OPTIMIZED SQL: SELECT COUNT(*) AS `$f0`
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can wait for the conclusion of https://issues.apache.org/jira/browse/HIVE-29257 and these OPTIMIZED SQL: lines would go away.

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.

4 participants