Hi, the window functions available on trino and starburst are too minimal and have intricacies that often fail. I would like to have a count(distinct [ val ]) window function to check duplicate rows without adding a cte and the listagg([ val ]) function without having to create an array and then converting it to a string. Additionally adding the QUALIFY statement will allow less complex queries and another cte that is not required.
Yes, Trino surely doesn’t implement everything (great example of QUALIFY which I think was created by Teradata eons ago), but our goal is always to focus on the ANSI SQL Standard syntax. Generally, it sounds like you are asking for improvements and new features to be added to Trino.
We both know how this works with OSS. We can build it and contribute, Trino | Development: Contribute, it ourselves as a PR, but that’s a daunting task for many/most of us! The more realistic approach is to be a customer of a company (such as Starburst) who has a lot of contributors/committers to the underlying project and then raising it up as a paying support customer wanting something to be better (or just plain present).
Again, not telling you something you don’t already know. All that said, in this forum you could always show an example of what you don’t like and see if others (I could probably try, too) might be able to help you make your pain points, well, less painful. It does sound like you are very knowledgeable in this WINDOW function space, so I’m surely not promising I can make it better, but I’d love to see what you’ve got if nothing more than having another person “feeling your pain” and hopefully being able to echo your concerns alongside you.
Good luck!