In the following query
select a.col1, a.col2, string_overlap(a.col1, a.col2) as overlap order by string_overlap(a.col1, a.col2) desc
I would like to say order by overlap desc instead of repeating the function call. However, that does not seem to be supported. string_overlap is a custom python function here.