This is an automated email from the ASF dual-hosted git repository.

liurenjie1024 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new fea7f1db Make SetExpression's constructor public (#1695)
fea7f1db is described below

commit fea7f1db65fd6a3d71af06f834d63ea40b3aaf10
Author: thecatherinehuang <[email protected]>
AuthorDate: Mon Sep 22 03:13:31 2025 -0700

    Make SetExpression's constructor public (#1695)
    
    ## Which issue does this PR close?
    
    - Closes #1696
    
    ## What changes are included in this PR?
    
    Makes `new` method for SetExpression public.
    
    ## Are these changes tested?
    
    Functionality is covered by existing tests.
---
 crates/iceberg/src/expr/predicate.rs | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/crates/iceberg/src/expr/predicate.rs 
b/crates/iceberg/src/expr/predicate.rs
index 1df552bb..123cfada 100644
--- a/crates/iceberg/src/expr/predicate.rs
+++ b/crates/iceberg/src/expr/predicate.rs
@@ -259,7 +259,22 @@ impl<T: Debug> Debug for SetExpression<T> {
 }
 
 impl<T> SetExpression<T> {
-    pub(crate) fn new(op: PredicateOperator, term: T, literals: 
FnvHashSet<Datum>) -> Self {
+    /// Creates a set expression with the given operator, term and literal.
+    ///
+    /// # Example
+    ///
+    /// ```rust
+    /// use fnv::FnvHashSet;
+    /// use iceberg::expr::{PredicateOperator, Reference, SetExpression};
+    /// use iceberg::spec::Datum;
+    ///
+    /// SetExpression::new(
+    ///     PredicateOperator::In,
+    ///     Reference::new("a"),
+    ///     FnvHashSet::from_iter(vec![Datum::int(1)]),
+    /// );
+    /// ```
+    pub fn new(op: PredicateOperator, term: T, literals: FnvHashSet<Datum>) -> 
Self {
         debug_assert!(op.is_set());
         Self { op, term, literals }
     }

Reply via email to