apache / polaris

The interoperable, open source catalog for Apache Iceberg
http://polaris.io/
Apache License 2.0
1.02k stars 99 forks source link

Support buckets containing underscore #263

Closed eric-maynard closed 1 week ago

eric-maynard commented 1 week ago

Description

Currently, we are using URI.getHost to extract the bucket from paths, which can return null unexpectedly when the bucket contains an underscore. This seems to be a known issue.

This PR introduces a thin new utility for extracting the path and adds a test for it.

Fixes #262

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Added a new suite, StorageUtilTest.

Checklist:

Please delete options that are not relevant.

RussellSpitzer commented 1 week ago

Thanks @eric-maynard and thanks @nk1506 for review