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

Guard access to analysis results #27353

Merged
merged 2 commits into from
May 30, 2024

Conversation

frankmcsherry
Copy link
Contributor

@frankmcsherry frankmcsherry commented May 30, 2024

The Analysis framework reveals the results of expression children as part of the ongoing derivation, but this means that information about non-children may not be available, and in particular information about future bindings in a LetRec are not available. This means that implementors must themselves guard against out-of-bounds access based on these identifiers, using e.g. results.get(id) rather than results[id].

There seemed to be only one instance of this, in our cardinality computation. It seems localized to Get expression handling.

fixes MaterializeInc/database-issues#8079

Motivation

Tips for reviewer

Checklist

@frankmcsherry frankmcsherry requested a review from a team May 30, 2024 11:26
Copy link
Contributor

@ggevay ggevay left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Would be great to add @mgree's repro in cardinality.slt. (Possibly with not checking the EXPLAIN output, just with statement ok.)

@frankmcsherry frankmcsherry merged commit cc0210f into MaterializeInc:main May 30, 2024
74 checks passed
@frankmcsherry
Copy link
Contributor Author

Thanks for the quick review!

@frankmcsherry frankmcsherry deleted the fix_27348 branch May 30, 2024 14:19
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