Skip to content

[SQL][MINOR] Update comments and remove dead code in UnionLoop#51097

Closed
Pajaraja wants to merge 1 commit intoapache:masterfrom
Pajaraja:pavle-martinovic_data/rctecleanup
Closed

[SQL][MINOR] Update comments and remove dead code in UnionLoop#51097
Pajaraja wants to merge 1 commit intoapache:masterfrom
Pajaraja:pavle-martinovic_data/rctecleanup

Conversation

@Pajaraja
Copy link
Copy Markdown
Contributor

@Pajaraja Pajaraja commented Jun 5, 2025

What changes were proposed in this pull request?

Remove function assertNoRecursiveCTE which is no longer used (when recursive references from subqueries were enabled, this function became obsolete).
Also edit comments and error message to reflect current state.

Why are the changes needed?

Code cleanliness.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing golden file tests in cte-recursion and postgreSQL/with.sql.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Jun 5, 2025
if (expr.plan.isStreaming) {
plan.failAnalysis("INVALID_SUBQUERY_EXPRESSION.STREAMING_QUERY", Map.empty)
}
assertNoRecursiveCTE(expr.plan)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this a behavior change?

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.

It shouldn't be; since now (when we allowed subquery references in recursive CTEs) we replace them with UnionLoopRef, so this will never fail!

As it currently stands, I think this is dead code.

@cloud-fan
Copy link
Copy Markdown
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in b44e243 Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants