Random incorrect result by the query when using CASE statement
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 2d 55m
- Merged PRs (30d)
- 182
Description
I sometimes get the wrong result from Pinot. Please find the query on which I was able to reproduce the issue
```sql
SELECT CASE
WHEN ist_day_of_quarter <= 100 THEN 92
ELSE 0
END AS no_of_days, count(*)
FROM stats_OFFLINE
WHERE "timestamp" BETWEEN 1672511400000 AND 1690741800000
AND id IN (.....)
and no_of_days = 92
group by 1
```
I am able to reproduce it on other pinot tables as well
I am using **Pinot 0.11** and the table has the following index config
- `ist_day_of_quarter` -> sortedColumn, bloomFilterColumns, rangeIndexColumns
- `id` -> invertedIndexColumns, sortedColumn, bloomFilterColumns
- `timestamp` -> rangeIndexColumns
Contributor guide
Assessment
This issue has not been assessed yet.