elastic / elastic/elasticsearch
SQL: Cannot filter on pivoted column
Open
:Analytics/SQL
>bug
Team:Analytics
- Dominant language
- Java
- Stars
- 77.9k
- Forks
- 26.1k
- PR merge metrics
- PR metrics pending
Description
The query `SELECT * FROM (SELECT languages, gender, salary FROM test_emp) PIVOT (AVG(salary) FOR gender IN ('M' as m, 'F' as f)) WHERE m > 0` yields no results even though there are 6 rows with `m > 0` for the same query without the `WHERE` clause.
Potentially related: #49159 and #80952
Contributor guide
Assessment
This issue has not been assessed yet.