Skip to content

Conversation

@angelamayxie
Copy link
Contributor

@angelamayxie angelamayxie commented Oct 15, 2025

fixes dolthub/dolt#9963

In #3166, I had skipped adding aggregate function dependencies to the from scope of the Having node because they were being included in the select expressions during GroupBy validation. However, removing them caused other scoping issue.

So I undid the skip, and instead of using the select expressions from the innermost Project node, we now use the select expressions from the innermost Project node that is not a direct child of a Having node. This exposed a bug where we were not able to resolve aliases in OrderBy expressions so I added Alias expressions to the select dependency map used for resolving OrderBy and Select expressions

…ild projection, add select aliases to select dependencies so they can be resolved by order by exprs
@angelamayxie angelamayxie requested a review from jycor October 15, 2025 22:59
@angelamayxie angelamayxie marked this pull request as ready for review October 15, 2025 22:59
Copy link
Contributor

@jycor jycor left a comment

Choose a reason for hiding this comment

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

LGTM

@angelamayxie angelamayxie merged commit 5786e2e into main Oct 16, 2025
8 checks passed
@angelamayxie angelamayxie deleted the angela/stocks_bug branch October 16, 2025 00:04
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.

Bug with having and dates

3 participants