You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub fn any_of<I>(&self, types: I) -> PartiqlShape
where
I: IntoIterator<Item = PartiqlShape>,
{
let any_of = AnyOf::from_iter(types);
match any_of.types.len() {
0 => type_dynamic!(),
1 => {
let AnyOf { types } = any_of;
types.into_iter().next().unwrap()
}
// TODO figure out what does it mean for a Union to be nullable or not
_ => PartiqlShape::AnyOf(any_of),
}
}
The AnyOf::from_iter(types) uses an IndexSet internally to deduplicate types, thus the match on any_of.types.len() could "flatten" AnyOfs that had duplicates. With the addition of IDs, this deduplication no longer happens...
After #485
PartiqlShapeBuilder.any_of
:The
AnyOf::from_iter(types)
uses anIndexSet
internally to deduplicate types, thus the match onany_of.types.len()
could "flatten"AnyOf
s that had duplicates. With the addition of IDs, this deduplication no longer happens...Originally posted by @jpschorr in #485 (review)
The text was updated successfully, but these errors were encountered: