-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Empty arrays in parameterized views #63563
Comments
Clickhouse is unable to deduce a type of an empty array. You need to use explicit cast
https://fiddle.clickhouse.com/4940c9a2-3d46-4fcb-b98b-545d2e9ec3ec 23.10 is out of support. |
Thanks, it is clear that the issue is with casting - the point is: this is very unobvious and difficult to fix. Understood re support - will use fiddle next time, thanks. |
You can leave it open. It can be improved. |
Cannot pass empty arrays to parameterized views in an obvious way:
CREATE OR REPLACE VIEW test.pview AS SELECT {a:Array(Int32)} = []
SELECT * FROM test.pview(a=[])
produces error:
Code: 456. DB::Exception: Substitution
ais not set. (UNKNOWN_QUERY_PARAMETER) (version 23.10.4.25 (official build))
BUT this works as expected:
SELECT * FROM test.pview(a='[]')
The text was updated successfully, but these errors were encountered: