v.19.3New Features
Generic Implementation of Arraywithconstant Function Was Added
Generic implementation of arrayWithConstant function was added. #4322 (alexey-milovidov)Why it matters
ThearrayWithConstant function allows users to create arrays filled with a constant value efficiently. This feature simplifies the generation of constant arrays, enhancing query expressiveness and performance by offloading array creation to the database engine.How to use it
Use thearrayWithConstant function in your SQL queries by specifying the desired array size and the constant value, for example:SELECT arrayWithConstant(5, 42)This creates an array of size 5, each element being 42.