Qserv, like, not like

qserv
sql
like
Tags: #<Tag:0x00007f7f784a7a50> #<Tag:0x00007f7f784a78c0> #<Tag:0x00007f7f784a7780>

(Mike Read) #1

On our Qserv install queries using NOT LIKE return the same as those using LIKE, we’re on a fairly recent build (a week or so old). Seems like an issue but I’m not sure if LIKE is supposed to be implemented or not.

Thanks
Mike

select shortName from Filter where shortName LIKE ‘Z’;

±----------+
| shortName |
±----------+
| Z |
±----------+

select shortName from Filter where shortName NOT LIKE ‘Z’;
±----------+
| shortName |
±----------+
| Z |
±----------+


(Fritz Mueller) #2

Thanks, Mike — we’ll have a look!


(Nate Pease) #3

Thanks for testing & reporting Mike! This is fixed in DM-16407, it will be included in the next weekly build on Friday.

The parser was silently ignoring the NOT part of NOT LIKE which was the reason for the bug. I’ve added code so that in all cases unsupported keywords and phrases will not be ignored, and instead will result in an error returned to the user. (definitely let me know if you find any new evidence otherwise!)