Actions
Bug #9230
closedillegal filters return 0 results rather than indicating an error
Status:
Duplicate
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
-
Story points:
-
Description
For example, if I accidentally use "=" instead of "==" as the comparison operator, I get 0 items back without any indication that there is no way that filter could ever match:
# arv collection list -f '[["modified_at","=","2016-05-18T13:22:11Z"]]' -l 0 { "kind":"arvados#collectionList", "etag":"", "self_link":"", "offset":0, "limit":0, "items":[], "items_available":0 } # arv collection list -f '[["modified_at","==","2016-05-18T13:22:11Z"]]' -l 0 { "kind":"arvados#collectionList", "etag":"", "self_link":"", "offset":0, "limit":0, "items":[], "items_available":2597859 }
Updated by Brett Smith over 8 years ago
- Status changed from New to Duplicate
Josh,
You actually have the opposite problem you think you do. =
is the correct filter operator (it's SQL-based). The filter with ==
gets silently ignored and returns all collections. That makes this a duplicate of #7166.
I believe the first filter is returning 0 results because our timestamps have microsecond precision. This may only match collections created at 2016-05-18T13:22:11.000000Z. Consider [['modified_at', '>=', '2016-05-18T13:22:11Z'], ['modified_at', '<', '2016-05-18T13:22:12Z']]
.
Actions