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

costed index range building #2104

Closed

Conversation

max-hoffman
Copy link
Contributor

No description provided.

@max-hoffman max-hoffman force-pushed the max/costed-index-scan branch from de5d0f1 to 98924b6 Compare November 2, 2023 18:59
@max-hoffman max-hoffman force-pushed the max/costed-index-range-building branch from 6dd07bb to f40ccbe Compare November 6, 2023 15:37
Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -200,7 +208,7 @@ func (c *indexCoster) updateBest(s sql.Statistic, filters sql.FastIntSet) {
// flatten converts a filter into a tree of indexFilter, a format designed
// to make costing index scans easier. We return the root of the new tree
// and a conjunction of filters that cannot be pushed into index scans.
func (c *indexCoster) flatten(e sql.Expression) (indexFilter, sql.Expression) {
func (c *indexCoster) flatten(e sql.Expression, invert bool) (indexFilter, sql.Expression) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is invert needed? I was trying to figure out what it means, but didn't see it referenced anywhere in the function. Seems like this might just be an artifact of the changes being split up into multiple change sets though.

@Hydrocharged Hydrocharged deleted the max/costed-index-range-building branch February 7, 2024 13:46
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.

2 participants