v.20.3Improvement
Implement arraySlice for Aggregate Function States to Fix Issues #9388 and #9391
Implement arraySlice for arrays with aggregate function states. This fixes #9388 #9391 (alexey-milovidov)Why it matters
This feature resolves the issue wherearraySlice could not handle arrays of aggregate function states, enabling users to perform slicing operations on such arrays. It improves functionality when working with states of aggregate functions stored in arrays, providing more flexibility in aggregation scenarios.How to use it
Users can now directly applyarraySlice to arrays composed of aggregate function states in their queries without encountering errors. For example, slicing an array of aggregate states can be done using:SELECT arraySlice(aggregate_states_array, start_index, length) FROM ...