Skip to content

approx_percentile_cont query fails: "Schema contains duplicate unqualified field name  #17730

@wiedld

Description

@wiedld

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions