Add support for tracking subqueries in catch_queries().
Review Request #13401 — Created Nov. 3, 2023 and submitted — Latest diff uploaded
catch_queries()
now looks for any subqueries as part of a query,
tracking them and nesting them in the appropriate parent query or
subquery. This works for a nestedDISTINCT
query, annotations,
aggregations, and filtering, at any depth.This will soon be used by
compare_queries()
to do thorough subquery
comparisons.
Unit tests pass.
Made use of this in the upcoming work on subquery comparisons.