Skip to content

Fix truncate transform ordering comparison - #3681

Open
mattfaltyn wants to merge 1 commit into
apache:mainfrom
mattfaltyn:agent/fix-truncate-transform-ordering
Open

Fix truncate transform ordering comparison#3681
mattfaltyn wants to merge 1 commit into
apache:mainfrom
mattfaltyn:agent/fix-truncate-transform-ordering

Conversation

@mattfaltyn

Copy link
Copy Markdown

Closes #3680

Rationale for this change

TruncateTransform.satisfies_order_of accessed the uninitialized _source_type attribute when comparing truncate transforms with different widths, raising AttributeError instead of returning a boolean.

Compare truncate widths directly, consistent with the Apache Iceberg Java implementation.

Are these changes tested?

Yes. Added regression coverage for both wider-to-narrower and narrower-to-wider comparisons.

  • uv run python -m pytest tests/test_transforms.py -q (283 passed)
  • make lint
  • make test PYTEST_ARGS=-q (3,768 passed; 1,560 deselected)

Are there any user-facing changes?

Yes. Comparing truncate transforms with different widths now returns the expected boolean instead of raising AttributeError.

@mattfaltyn
mattfaltyn marked this pull request as ready for review July 18, 2026 07:24
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TruncateTransform.satisfies_order_of raises AttributeError for different widths

1 participant