alexanderbianchi commented on code in PR #3739:
URL: https://github.com/apache/iceberg-rust/pull/3739#discussion_r4648387706
##########
crates/iceberg/src/expr/predicate.rs:
##########
@@ -286,7 +344,19 @@ impl<T> SetExpression<T> {
/// Return the hash set of values compared against the term in this
expression.
pub fn literals(&self) -> &FnvHashSet<Datum> {
- &self.literals
+ &self.literals.values
+ }
+
+ pub(crate) fn membership_index(&self) -> Option<Arc<SetIndex>> {
+ // Short lists benefit from Arrow's vectorized scalar comparisons.
+ const MIN_INDEX_SIZE: usize = 32;
+ if self.literals().len() < MIN_INDEX_SIZE {
+ return None;
+ }
+ self.literals
+ .index
+ .get_or_init(|| SetIndex::new(self.literals()).map(Arc::new))
+ .clone()
Review Comment:
addressed in
https://github.com/apache/iceberg-rust/pull/3739/changes/63ebab2e493ad2d6ea87246b22893cd88ad698a6
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]