Skip to content

Support unbound transform in predicate expression #2456

Open

Description

@advancedxy

Is your feature request related to a problem or challenge?

Currently, only reference is supported in iceberg-rust's predicate API, which means we can construct scan filters like: ref(a) > 10), or ref(a) == 10 etc. However, for iceberg table with bucket transform, it's impossible to express the bucket partition filter, which should be something like bucket(10, col_a) >=0 and bucket(10, col_a) < 5. It would be useful to extend the predicate to support unbound transform in the predicate expression

Ref: the predicate enum definition

# in the predicate.rs
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub enum Predicate {
    /// AlwaysTrue predicate, for example, `TRUE`.
    AlwaysTrue,
    /// AlwaysFalse predicate, for example, `FALSE`.
    AlwaysFalse,
    /// And predicate, for example, `a > 10 AND b < 20`.
    And(LogicalExpression<Predicate, 2>),
    /// Or predicate, for example, `a > 10 OR b < 20`.
    Or(LogicalExpression<Predicate, 2>),
    /// Not predicate, for example, `NOT (a > 10)`.
    Not(LogicalExpression<Predicate, 1>),
    /// Unary expression, for example, `a IS NULL`.
    Unary(UnaryExpression<Reference>),
    /// Binary expression, for example, `a > 10`.
    Binary(BinaryExpression<Reference>),
    /// Set predicates, for example, `a in (1, 2, 3)`.
    Set(SetExpression<Reference>),
}

Describe the solution you'd like

Add unbound transform to the predicate expression.

Willingness to contribute

I can contribute to this feature independently

Activity

  1. advancedxy commented on May 15, 2026

    @advancedxy
    ContributorAuthor

    Hi @liurenjie1024 renjie, would you mind to take a look at this in your spare time. I can submit a PR if we can agree on this is the right direction.

  2. TwinklerG commented on Jun 8, 2026

    @TwinklerG
    Contributor

    I think it a great proposal. Happy to collaborate on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions