fix(hydro_lang): move KeyedStream trait constraints from impl to methods#2319
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the KeyedStream implementation to move K: Eq + Hash trait constraints from impl block where clauses to individual method where clauses. This improves API flexibility by allowing methods that don't require key hashing/equality (like map, filter, inspect) to work with any key type, while still enforcing constraints on methods that need to group by key (like aggregations and joins).
- Removed
K: Eq + Hashfrom four impl block where clauses - Added
K: Eq + Hash(orK: Clone + Eq + Hashwhere needed) to 16 individual method where clauses - Methods requiring hashing/equality:
scan,generator,fold_early_stop,first, various fold/reduce variants,value_counts, andfilter_key_not_in
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I believe not all of the methods will need Eq + Hash, e.g. maybe not |
Actually |
Moves K: Eq + Hash constraints from impl block where clauses to individual method where clauses in KeyedStream.
fixes #2254