-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support files with locations ending with whitespace #18206
Merged
findepi
merged 4 commits into
master
from
findepi/support-files-with-locations-ending-with-whitespace-701307
Jul 14, 2023
Merged
Support files with locations ending with whitespace #18206
findepi
merged 4 commits into
master
from
findepi/support-files-with-locations-ending-with-whitespace-701307
Jul 14, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
findepi
requested review from
electrum,
dain,
losipiuk,
ebyhr,
alexjo2144 and
findinpath
July 10, 2023 08:31
findepi
force-pushed
the
findepi/support-files-with-locations-ending-with-whitespace-701307
branch
from
July 10, 2023 08:31
d36e8ec
to
a9c4f5a
Compare
losipiuk
reviewed
Jul 10, 2023
lib/trino-filesystem-s3/src/test/java/io/trino/filesystem/s3/AbstractTestS3FileSystem.java
Outdated
Show resolved
Hide resolved
losipiuk
approved these changes
Jul 10, 2023
findepi
force-pushed
the
findepi/support-files-with-locations-ending-with-whitespace-701307
branch
from
July 10, 2023 10:22
a9c4f5a
to
e49af31
Compare
findinpath
approved these changes
Jul 10, 2023
findepi
force-pushed
the
findepi/support-files-with-locations-ending-with-whitespace-701307
branch
from
July 10, 2023 10:54
e49af31
to
5d3d471
Compare
findepi
commented
Jul 10, 2023
lib/trino-filesystem/src/test/java/io/trino/filesystem/AbstractTestTrinoFileSystem.java
Show resolved
Hide resolved
findepi
force-pushed
the
findepi/support-files-with-locations-ending-with-whitespace-701307
branch
2 times, most recently
from
July 10, 2023 13:08
bfd42c1
to
abb0ece
Compare
losipiuk
approved these changes
Jul 10, 2023
Were you able to register locations ending in whitespace previously with the Hadoop If it was normalized before, maybe we don't need to support these types of locations. |
// prints "s3://bucket/whitespace x"
System.out.println(new org.apache.hadoop.fs.Path("s3://bucket/whitespace ") + "x"); |
findepi
force-pushed
the
findepi/support-files-with-locations-ending-with-whitespace-701307
branch
2 times, most recently
from
July 12, 2023 08:40
30a067f
to
199d84e
Compare
Use blob contents different than their locations.
Whitespace, and especially trailing whitespace, may have confusing consequences when used in file locations so it's not recommended. However, whitespace, including trailing whitespace, is valid part of file locations and Trino should be able to read such files (objects). The removed assertions are mostly covered by the new test method being added, except that this new test is run for S3-like filesystems only and does not cover renames. Both aspects will be addressed in a following commit.
findepi
force-pushed
the
findepi/support-files-with-locations-ending-with-whitespace-701307
branch
from
July 12, 2023 20:04
199d84e
to
c66d37d
Compare
(rebased to resolve conflicts) |
findepi
deleted the
findepi/support-files-with-locations-ending-with-whitespace-701307
branch
July 14, 2023 13:59
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Whitespace, and especially trailing whitespace, may have confusing consequences when used in file locations so it's not recommended. However, whitespace, including trailing whitespace, is valid part of file locations and Trino should be able to read such files (objects).