Skip to content

Random incorrect result by the query when using CASE statement #11267

@ayush-san

Description

@ayush-san

I sometimes get the wrong result from Pinot. Please find the query on which I was able to reproduce the issue

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions