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

Make Polaris safe against certain unparseable locations #552

Open
snazy opened this issue Dec 14, 2024 · 0 comments
Open

Make Polaris safe against certain unparseable locations #552

snazy opened this issue Dec 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@snazy
Copy link
Member

snazy commented Dec 14, 2024

Using java.net.URI for paths/locations generated/used by Apache Iceberg is particularly unsafe.

Characters that are illegal in URI string representations are not escaped by Iceberg and lead to runtime exceptions when parsed for example by java.net.URI.create(String).

Example: A legit column/partition-field name "_foo_bar_" will end "as is" in any path generated by Iceberg, leading to Caused by: java.lang.IllegalArgumentException: Illegal character in path at index ....

The safest approach to prevent this issue entirely is to have a dedicated class that deals with "unsafe encodings", maybe call it "StorageUri".

Mixing "unsafe" and "safe" encodings will cause errors.

@snazy snazy added the bug Something isn't working label Dec 14, 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

1 participant