ydb-platform / ydb

YDB is an open source Distributed SQL Database that combines high availability and scalability with strong consistency and ACID transactions
https://ydb.tech
Apache License 2.0
3.96k stars 543 forks source link

Allow EmptyList for prepared query parameters of type `List<?>` #4254

Open arkhipov opened 5 months ago

arkhipov commented 5 months ago

Now if I try setting the value of a query parameter of the type List<?>, the server returns that EmptyList cannot be assigned to a parater of the type List<?>. It is annoying when you have a single prepared query which can get the empty list as its parameter.

For example

DECLARE $x AS List<uint32>;
DECLARE $y AS List<uint32>;

SELECT * FROM X WHERE x IN $x
UNION ALL
SELECT * FROM X WHERE y IN $y
gridnevvvit commented 5 months ago

@shnikd first, we need to implement the unit test to reproduce the issue and then we need a fix.