Bug in WHERE clause?
I believe I must have run into a bug with the WHERE clause in SQL on our Vertica Analytic Database v9.3.0-0.
I have the following relatively simple WHERE on a complex query:
WHERE txnYesterday.AverageBasketSizeEUR > agg90Days.avg90DayAverageBasketSizeEUR + 4 * agg90Days.stddev90DayAverageBasketSizeEUR
The values of come from subqueries that make the calculations over different time spans and result in the following:
The problem is that the resulting WHERE should be FALSE:
WHERE 20 > 20 + 4 * 0
But the row is part of the result set as if "<" would be the same as "<=".
I tried to debug the problem by replacing the columns in the query with literals, but the problem continues until I replace every column with a literal.