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

Prevent empty results when selecting folder(s) in one bucket that match an object name in another bucket #23

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

thebengeu
Copy link
Member

Given a bucket "a" and an object name "123/456", and a bucket "b" and an object/folder name "123", when selecting bucketname="a" and prefix="":

Before the fix:
If the latter doesn't exist, a row with only name="123" populated and the other columns being NULL is returned.
If the latter exists, name="123" is left joined with the row with object/folder name "123", and then filtered out by the WHERE ... objects.bucket_id=bucketname clause.

After the fix:
The row with object/folder name "123" isn't left joined, so a row with only name="123" populated and the other columns being NULL is returned correctly.

…er(s) in one bucket that match an object name in another bucket
@thebengeu thebengeu requested a review from inian October 11, 2021 08:48
@inian inian merged commit 72c8bf1 into main Oct 11, 2021
@inian inian deleted the fix/empty-results branch October 11, 2021 17:27
@kiwicopple
Copy link
Member

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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