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

Add additional options for catalog test implementations #4906

Merged
merged 6 commits into from
May 30, 2022

Conversation

bryanck
Copy link
Contributor

@bryanck bryanck commented May 30, 2022

This PR adds a couple of options to the catalog tests so it is more flexible for different catalog implementations. The first option is to support testing against catalogs that manage the table location. The second option is to support testing against catalogs that do not support slashes in the namespace or table name.

@github-actions github-actions bot added the core label May 30, 2022
return false;
}

protected boolean supportsNamesWithSlashes() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not supported? Slashes should be properly escaped in paths, which is why we have this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For REST based catalogs, some servers don't allow escaped slashes in the path by default, like Tomcat. There are workarounds but it can open up potential security issues, so some may choose not to support this.

Copy link
Contributor

@kbendick kbendick May 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that for escaped slashes in the typical way or for the REST catalogs escaped slashes that use %00 (Null byte)?

I’m good with not requiring that server implementations require this (I’m almost certain it’s already not required). But would want to ensure the spec is up to date on that re: having to support it or not. But if the null-byte can open up security problems (which in general it can) then I can understand people deciding tables / namespaces really don’t benefit from having slashes in them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The null byte is used as a delimiter AFAIK, the slash is just URL encoded, i.e. %2F

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable to me.

@rdblue rdblue merged commit a8b494f into apache:master May 30, 2022
@rdblue
Copy link
Contributor

rdblue commented May 30, 2022

Thanks, @bryanck!

@bryanck bryanck deleted the test-updates branch June 22, 2022 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants