Skip to content

The idColumns are not read correctly from table config anymore in RecordUtils.java, since the namespace portion of the tableName is not used anymore #17151

Description

@rainerschamm

Apache Iceberg version

1.11.0 (latest release)

Query engine

None

Please describe the bug 🐞

This is a small regression introduced in the very last commit against RecordUtils.java.

In the method RecordUtils.createTableWriter():

This was changed:

-    List<String> idCols = config.tableConfig(tableName).idColumns();
+    List<String> idCols = config.tableConfig(tableReference.identifier().name()).idColumns();

But it should be the following, since the "namespace" portion of the original tableName is now lost:

List<String> idCols = config.tableConfig(tableReference.identifier().toString()).idColumns();

This can easily be verified by comparing .toString() with .name() in TableIdentifier.

Also other code example show the correct usage:

For example in Coordinator.java, the table config is read correctly:

String branch = config.tableConfig(tableIdentifier.toString()).commitBranch();

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions