Describe the bug
We received reports that some approx_percentile_cont queries failed with the error: Schema contains duplicate unqualified field name "approx_percentile_cont(Float64(0.95)). These specific queries previously worked, therefore it is a regression.
Query:
SELECT
DATE_BIN(INTERVAL '1d', time, '1970-01-01T00:00:00Z'::TIMESTAMP) AS _time,
approx_percentile_cont("col_a", 0.95) as col_a_alias,
approx_percentile_cont("col_b", 0.95) as col_b_alias
FROM "my_table"
GROUP BY _time
ORDER BY _time
To Reproduce
See this commit: influxdata@5cbeb1c
Which is also the first commit on this PR, which fixes the issue:
Expected behavior
This query should pass.
Additional context
No response