Skip to content

refactor!: tidy table provider constructors and stale names - #110

Merged
gabotechs merged 1 commit into
apache:mainfrom
NoahKusaba:chore/provider-constructor-cleanups
Nov 18, 2026
Merged

gabotechs merged 1 commit into
apache:mainfrom
NoahKusaba:chore/provider-constructor-cleanups

Conversation

@NoahKusaba

@NoahKusaba NoahKusaba commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

  • IcebergStaticTableProvider's two constructors are async but never await anything.
  • IcebergMetadataTableProvider::schema() unwrap()s a schema conversion on every call. It should fail at construction, not panic during planning.
  • Errors and docs still use the pre-Refactor DataFusion crate folder structure #49 name IcebergTableProvider, and AGENTS.md has other stale names.

What changes are included in this PR?

  • try_new_from_table and try_new_from_table_snapshot are synchronous.
  • IcebergMetadataTableProvider::new becomes try_new, which converts the schema once and stores it.
  • Stale names are fixed in error messages, docs and AGENTS.md.

Are there any user-facing changes?

Yes: drop .await after the static provider constructors, and use IcebergMetadataTableProvider::try_new(..)? instead of new(..).

Are these changes tested?

Yes, by the existing tests, updated for the new signatures and error message.

- Make IcebergStaticTableProvider::try_new_from_table and
  try_new_from_table_snapshot synchronous; neither awaited anything.
- Replace IcebergMetadataTableProvider::new with a fallible try_new that
  converts the schema once, so TableProvider::schema no longer unwraps.
- Replace the old IcebergTableProvider name in error messages and docs,
  and refresh other stale names in AGENTS.md.
@NoahKusaba

NoahKusaba commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

cc @gabotechs: starting a series of small, easy-to-merge cleanups. After that I'll take on the bigger refactors you've been steering toward in #67 and #48.

Future refactor PR's may overlap with some of these cleanups, but I just want to sort out the gunk first.

@mbutrovich mbutrovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @NoahKusaba, this is a nice cleanup. Moving the metadata schema conversion into try_new so planning can't panic is the right call.

@mbutrovich mbutrovich changed the title refactor: tidy table provider constructors and stale names refactor!: tidy table provider constructors and stale names Nov 17, 2026
@mbutrovich

Copy link
Copy Markdown
Contributor

I renamed it to track the breaking change.

@gabotechs gabotechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, thanks @NoahKusaba and @mbutrovich!

@gabotechs
gabotechs merged commit 21c7535 into apache:main Nov 18, 2026
5 checks passed
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.

3 participants