Skip to content

Conversation

@geruh
Copy link
Contributor

@geruh geruh commented Nov 25, 2025

Related to #2775

Rationale for this change

Update the Set Expression serialization to align with the REST spec. Today, the set expression literals are serialized under items, instead of values.

For instance:

{
  "term": "foo",
  "type": "not-in",
  "items": [
    1,
    2,
    3
  ]
}

When it should be:

{
  "term": "foo",
  "type": "not-in",
  "values": [
    1,
    2,
    3
  ]
}

Rest ref: https://github.com/apache/iceberg/blob/47d5f5009eafbbb526e6e2c9cbeac3105bf34670/open-api/rest-catalog-open-api.yaml#L2353

Expression ref: https://github.com/apache/iceberg/blob/d19e3ff07653167d902865281601a5da4e2f2def/core/src/main/java/org/apache/iceberg/expressions/ExpressionParser.java#L189-L192

Are these changes tested?

Yes

Are there any user-facing changes?

only serialization, and initialization stays the same.

@geruh geruh changed the title fix: Serialize the set expressions to values fix: Set Expression serialization to use 'values' Nov 25, 2025
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped into the same :D Working on a PR to go from JSON to Expressions

@Fokko Fokko merged commit 9610b41 into apache:main Nov 25, 2025
8 checks passed
@Fokko
Copy link
Contributor

Fokko commented Nov 25, 2025

Thanks @geruh 🙌

@geruh geruh deleted the set-value branch November 25, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants