-
Notifications
You must be signed in to change notification settings - Fork 1.8k
remove access methods of Filter and make field pub. #4464
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
Conversation
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems reasonable to me. Thanks @jackwener
| pub struct Filter { | ||
| /// The predicate expression, which must have Boolean type. | ||
| predicate: Expr, | ||
| pub predicate: Expr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would allow side-stepping the schema validation in try_new? I don't know how important this is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I think it isn't a problem.
Projection Aggregate Subquery .... also is like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can at least document what invariants are required between fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would allow side-stepping the schema validation in try_new? I don't know how important this is
Yes, the motivation for the current design (introduced in #3796) was to prevent invalid filters from being created.
|
What problem is this PR solving? It is partially reverting changes from #3796 that were introduced to prevent some class of errors when constructing plans. |
|
Got it, Thanks your explanation @andygrove |
Which issue does this PR close?
Filter has access method which function like
get()inobject-oriented.Rust don't need like
get()method for struct. Because default immutable.Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?