Skip to content

Cannot set write.data.path to a subdirectory under the current table location OPTIMIZED_SIBLING_CHECK=true #3379

@HonahX

Description

@HonahX

Describe the bug

Currently, when updating write.data.path of the table to a subdir under the table location, it will fail the location overlap check. This seems to be a regression since https://github.com/apache/polaris/pull/1686/changes#diff-1e0bdc1f194df7cceed5d4b2ddad483199b80d090a1c682f92ecf5fec5f83b2f

To Reproduce

For example

spark-sql> ALTER TABLE tb1 SET TBLPROPERTIES (
  'write.data.path' = '<tableLocation>/alternative_data'
);

org.apache.iceberg.exceptions.ForbiddenException: Forbidden: Unable to create table at location 's3://<table_location>' because it conflicts with existing table or namespace at location 's3://<table_location>`

Actual Behavior

No response

Expected Behavior

The validateNoLocationOverlap should only prevent updating table location to be the same or child of sibling table's locations, not itself. Setting write.data.path to <table_location>/alternative instead of the default <table_location>/data should be a valid use case

Additional context

The issue exists in both the active validateNoLocationOverlap path and the OPTIMIZED_SIBLING_CHECK path. The later have some other issues as described here: #3378

System information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions