-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Derive UDF equality from PartialEq, Hash #16842
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
Derive UDF equality from PartialEq, Hash #16842
Conversation
e6bf41d to
234c978
Compare
|
This is POC only for now. Note the PR goals:
|
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.
😍
Reduce boilerplate in cases where implementation of
`{ScalarUDFImpl,AggregateUDFImpl,WindowUDFImpl}::{equals,hash_code}` can
be derived using standard `PartialEq` and `Hash` traits.
This is code complexity reduction.
While valuable on its own, this also prepares for more automatic
derivation of UDF equals/hash and/or removal of default implementations
(which currently are error-prone).
234c978 to
493ac60
Compare
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.
Thanks @findepi -- this is a nice improvement I think
kosiew
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.
Looks good to me.
* Derive UDF equality from PartialEq, Hash
Reduce boilerplate in cases where implementation of
`{ScalarUDFImpl,AggregateUDFImpl,WindowUDFImpl}::{equals,hash_code}` can
be derived using standard `PartialEq` and `Hash` traits.
This is code complexity reduction.
While valuable on its own, this also prepares for more automatic
derivation of UDF equals/hash and/or removal of default implementations
(which currently are error-prone).
* udf_equals_hash example
* test udf_equals_hash
* empty: roll the dice 🎲
Reduce boilerplate in cases where implementation of
{ScalarUDFImpl,AggregateUDFImpl,WindowUDFImpl}::{equals,hash_value}can be derived using standardPartialEqandHashtraits.This is code complexity reduction. Follows #16781
While valuable on its own, this also prepares for more automatic derivation of UDF equals/hash and/or removal of default implementations (which currently are error-prone) -- #16677
ScalarUDFImpl) equality from PartialEq, Hash #16865