Since we know the worst-case size of a canonical statement is the size of the query string, we can reduce the number of memory allocations to one in the get_canonical function.
Since we know the worst-case size of a canonical statement is the size of the query string, we can reduce the number of memory allocations to one in the get_canonical function.