Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: Finalize subqueries in IfConditionals when applying stored procedures #2531

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Jun 4, 2024

When applying a stored procedure to a CALL statement, we weren't calling finalizeSubqueries() on any subqueries in IfConditional expressions, which caused the subquery to not have a NodeExecBuilder populated.

Customer issue: dolthub/dolt#7944

Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

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

This looks good for subqueries that don't reference any tables/cols/functions/procs from a catalog, but I'm not sure what the rules are generally? Presumably we would fail earlier in analysis, so any extensions there wouldn't conflict with this change

@fulghum fulghum merged commit 83e1071 into main Jun 4, 2024
9 checks passed
@fulghum fulghum deleted the fulghum/dolt-7944 branch June 4, 2024 20:15
@nicktobey
Copy link
Contributor

#2556 is an example of where we had a subquery in a procedure failing because it referenced a table.

Is there any reason why we don't just run the full analyzer on procedure bodies? It's what we do for trigger bodies (in the getTriggerLogic function.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants