Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make predicate accessor functions public #1005

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions crates/iceberg/src/expr/predicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ impl<T> UnaryExpression<T> {
}

/// Return the operator of this predicate.
pub(crate) fn op(&self) -> PredicateOperator {
pub fn op(&self) -> PredicateOperator {
self.op
}

/// Return the term of this predicate.
pub(crate) fn term(&self) -> &T {
pub fn term(&self) -> &T {
&self.term
}
}
Expand Down Expand Up @@ -199,17 +199,18 @@ impl<T> BinaryExpression<T> {
Self { op, term, literal }
}

pub(crate) fn op(&self) -> PredicateOperator {
/// Return the operator used by this predicate expression.
pub fn op(&self) -> PredicateOperator {
self.op
}

/// Return the literal of this predicate.
pub(crate) fn literal(&self) -> &Datum {
pub fn literal(&self) -> &Datum {
&self.literal
}

/// Return the term of this predicate.
pub(crate) fn term(&self) -> &T {
pub fn term(&self) -> &T {
&self.term
}
}
Expand Down Expand Up @@ -261,16 +262,17 @@ impl<T> SetExpression<T> {
}

/// Return the operator of this predicate.
pub(crate) fn op(&self) -> PredicateOperator {
pub fn op(&self) -> PredicateOperator {
self.op
}

pub(crate) fn literals(&self) -> &FnvHashSet<Datum> {
/// Return the hash set of values compared against the term in this expression.
pub fn literals(&self) -> &FnvHashSet<Datum> {
&self.literals
}

/// Return the term of this predicate.
pub(crate) fn term(&self) -> &T {
pub fn term(&self) -> &T {
&self.term
}
}
Expand Down
Loading