Hi
In testing Qserv queries on some non-LSST data (UKIDSS) we’ve come across a potential oddity with the use of the OR operator. For example, our Filter table contains (select filterID,cutOff from Filter)
±---------±-----------+
| filterID | cutOff |
±---------±-----------+
| 0 | -999999000 |
| 1 | 0.925 |
| 2 | 1.07 |
| 3 | 1.33 |
| 4 | 1.78 |
| 5 | 2.37 |
| 6 | 2.132 |
| 7 | 2.177 |
| 8 | -999999000 |
| 9 | 1.211 |
| 10 | 1.638 |
±---------±-----------+
then in doing
select filterID,cutOff from Filter where cutOff > 2 and (filterID=6 or filterID=9);
I would expect only 1 result row (as it is under mySQL direct)
±---------±-------+
| filterID | cutOff |
±---------±-------+
| 6 | 2.132 |
±---------±-------+
but under Qserv I get
±---------±-------+
| filterID | cutOff |
±---------±-------+
| 6 | 2.132 |
| 9 | 1.211 |
±---------±-------+
and it seems like the brackets are being ignored.
Apologies if this is a known issue or I’m doing something incorrect, apparently we’re running Qserv 12.1-145-g2ab864b4+5.
Anyhow can anyone can confirm that this is unexpected behaviour and if it’s present in the latest Qserv.
Thanks
Mike