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

S3 table function path matching: single value in curly brackets does not work #25282

Open
ray-at-github opened this issue Jun 15, 2021 · 0 comments
Assignees

Comments

@ray-at-github
Copy link

ray-at-github commented Jun 15, 2021

Describe the issue
S3 table function path matching with curly brackets {}, when there are multiple values it works like a charm. However it returns no rows when there is only 1 value within the curly brackets. It would be ideal if it also supports a single value (or even an empty list), because sometimes the list of values is constructed from an array programmatically.

How to reproduce
21.6.4.26

Multiple values works:

SELECT count(*)
FROM s3('https://storage.yandexcloud.net/my-test-bucket-768/{some,another}_prefix/some_file_1.csv', 'CSV', 'name String, value UInt32')

Query id: 8363ef9d-c6af-4036-9f63-2da969df5732

┌─count()─┐
│       6 │
└─────────┘

1 rows in set. Elapsed: 2.632 sec.

Single value doesn't:

SELECT count(*)
FROM s3('https://storage.yandexcloud.net/my-test-bucket-768/{some}_prefix/some_file_1.csv', 'CSV', 'name String, value UInt32')

Query id: 79ec92e1-a13e-4164-a999-08334c40a3fe

┌─count()─┐
│       0 │
└─────────┘

1 rows in set. Elapsed: 1.353 sec.

Expected behavior
Ideally it also supports single value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants