Noticed on ADS 14-beta-42.
Running following queries against dataset https://www.amazon.com/clouddrive/share?s=HT4zINyQTjMqN53fWySaDk causes error as below:
1) select * from test_collection where (user_id + number) in (8074, 9734, 264)
go
2)select * from test_collection where (user_id + number) in (8073 + 1, 9623 + 111, 153 + 111)
go
>[Error] Script lines: 17-18 ------------------------
Invalid comparison operator: in .
Could you please investigate this issue? Thanks
This error is thrown because the "user_id + number" arithmetic expression under a WHERE filter requires the MongoDB $where operator. However, there is no Javascript arithmetic operator for the IN one, thus the exception is thrown.
I can only update the error message with something more descriptive (e.g. mentioning the $where restriction) but this is an implementation detail (i.e. how MongoSQL queries gets translated to the MongoShell equiv command), not necessary to be presented to the users.
Issue #9498 |
Closed |
Won't Fix |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
This error is thrown because the "user_id + number" arithmetic expression under a WHERE filter requires the MongoDB $where operator. However, there is no Javascript arithmetic operator for the IN one, thus the exception is thrown.
I can only update the error message with something more descriptive (e.g. mentioning the $where restriction) but this is an implementation detail (i.e. how MongoSQL queries gets translated to the MongoShell equiv command), not necessary to be presented to the users.