ScalarValue has interior mutability but is intentionally used as hash key
(
column_name: impl Into<String>,
guarantee: Guarantee,
literals: impl IntoIterator<Item = &'a ScalarValue>,
)
| 95 | /// create these structures from an predicate (boolean expression). |
| 96 | #[allow(clippy::allow_attributes, clippy::mutable_key_type)] // ScalarValue has interior mutability but is intentionally used as hash key |
| 97 | fn new<'a>( |
| 98 | column_name: impl Into<String>, |
| 99 | guarantee: Guarantee, |
| 100 | literals: impl IntoIterator<Item = &'a ScalarValue>, |
| 101 | ) -> Self { |
| 102 | let literals: HashSet<_> = literals.into_iter().cloned().collect(); |
| 103 | |
| 104 | Self { |
| 105 | column: Column::from_name(column_name), |
| 106 | guarantee, |
| 107 | literals, |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | /// Return a list of [`LiteralGuarantee`]s that must be satisfied for `expr` |
| 112 | /// to evaluate to `true`. |