Skip to content

tests: ensure type consistency per spec - #3719

Open
jayceslesar wants to merge 2 commits into
apache:mainfrom
jayceslesar:tests/enumerate-all-pyarrow-types
Open

jayceslesar wants to merge 2 commits into
apache:mainfrom
jayceslesar:tests/enumerate-all-pyarrow-types

Conversation

@jayceslesar

@jayceslesar jayceslesar commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes #3714

Comment thread tests/io/test_pyarrow.py
StatsAggregator(iceberg_type, physical_type_string)


def test_iceberg_types_write_spec_compliant_parquet_types(tmp_path: Path) -> None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You've got a test below to fail if pyarrow introduces any types not in the test. Can you do something similar if we introduce a type and it's not in the list?

missing = {
name
for name in dir(pa.lib)
if name.startswith("Type_") and name not in unconstructible and getattr(pa.lib, name) not in covered_type_ids

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I really love the idea of this test. I worry that this is going to be too brittle and relies on the Pyarrow directory / file structure remaining as-is.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

what if we just remove this test? i dont really like it no matter how its implemented hahahaha

@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 Sep 22, 2026

This branch has not been deployed

No deployments
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.

add test to enumerate all pyarrow types

2 participants