trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.49k stars 3.02k forks source link

Fix handling of hidden objects in `migrate` and `add_files`/`add_files_from_table` procedures #23891

Open ebyhr opened 4 weeks ago

ebyhr commented 4 weeks ago

The first statement skips hidden objects correctly, but the 2nd statement doesn't.

ALTER TABLE region EXECUTE add_files('file:///tmp/add_files/.hidden', 'parquet');
ALTER TABLE region EXECUTE add_files('file:///tmp/add_files/.hidden/', 'parquet');

We should fix the logic around: https://github.com/trinodb/trino/blob/f9f694394ec2bce41cb51885d64c34f5f9c67707/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/procedure/MigrationUtils.java#L108-L112

uditvarshney commented 2 weeks ago

@ebyhr I would like to take this.