Skip to content

Docs: Fix type mismatch in JDBC catalog Java API example#17086

Open
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:fix/jdbc-catalog-example-cast
Open

Docs: Fix type mismatch in JDBC catalog Java API example#17086
thswlsqls wants to merge 1 commit into
apache:mainfrom
thswlsqls:fix/jdbc-catalog-example-cast

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Closes #17083

Summary

  • The JDBC catalog Java API example assigned CatalogUtil.buildIcebergCatalog(...)'s result directly to a JdbcCatalog variable, but the method's only declared return type is Catalog, causing an "incompatible types" compile error.
  • Added an explicit (JdbcCatalog) cast so the example compiles as written.

Testing done

  • Docs-only change, no behavior change — no test added. Verified against core/src/main/java/org/apache/iceberg/CatalogUtil.java line 312 (public static Catalog buildIcebergCatalog(...)).

CatalogUtil.buildIcebergCatalog(...) returns Catalog, not JdbcCatalog.
The example assigned the result directly to a JdbcCatalog variable
without a cast, which fails to compile. Add the explicit cast.

Generated-by: Claude Code
@github-actions github-actions Bot added the docs label Jul 3, 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.

Docs: Fix type mismatch in JDBC catalog Java API example

2 participants