v.23.8Improvement

Function arrayIntersect Returns Values in Order of First Argument

Function arrayIntersect now returns the values in the order, corresponding to the first argument. Closes #27622. #51850 (Yarik Briukhovetskyi).
The arrayIntersect function now returns the intersection values in the order they appear in the first argument array.

Why it matters

This feature addresses the issue where arrayIntersect previously returned intersected elements in an arbitrary order. Ordering the results according to the first input array enhances predictability and consistency, making it easier for users to work with intersected arrays and maintain element order.

How to use it

Simply use the arrayIntersect function as before in your SQL queries. The returned intersection will now respect the order of elements from the first array argument without requiring additional parameters or changes.