It's cool workaround for the problem that preserves the problem. An alternative is to write the query in a more reasonable language like https://prql-lang.org/ which has a representation closer to the semantic meaning and mostly avoid the big diff in the first place.