Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table creation does not renumber schema field ids #304

Closed
twuebi opened this issue Aug 28, 2024 · 1 comment
Closed

table creation does not renumber schema field ids #304

twuebi opened this issue Aug 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@twuebi
Copy link
Contributor

twuebi commented Aug 28, 2024

org.apache.iceberg.catalog.CatalogTests#testBasicCreateTable and other tests in https://github.com/apache/iceberg/blob/8e2eb9ac2e33ce4bac8956d4e2f099444d03c0e3/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java#L493 use this to create a table:

  protected static final Schema SCHEMA =
      new Schema(
          required(3, "id", Types.IntegerType.get(), "unique ID 🤪"),
          required(4, "data", Types.StringType.get()));

and then check for this:

  // This is the actual schema for the table, with column IDs reassigned
  protected static final Schema TABLE_SCHEMA =
      new Schema(
          required(1, "id", Types.IntegerType.get(), "unique ID 🤪"),
          required(2, "data", Types.StringType.get()));
@twuebi twuebi added the bug Something isn't working label Aug 28, 2024
@c-thiel
Copy link
Contributor

c-thiel commented Oct 26, 2024

Fixed in the latest version with moving to the upstream TableMetadataBuilder

@c-thiel c-thiel closed this as completed Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants