Project

General

Profile

Actions

Bug #6992

open

[API] Support numeric filter comparisons for numeric fields

Added by Brett Smith over 8 years ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
Story points:
-
Release:
Release relationship:
Auto

Description

I expected this to work:

>>> arvados.util.list_all(arv.job_tasks().list, filters=[['sequence', '>', 0]])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/arvados/util.py", line 370, in list_all
    c = fn(offset=offset, **kwargs).execute(num_retries=num_retries)
  File "/usr/local/lib/python2.7/dist-packages/oauth2client/util.py", line 137, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 729, in execute
    raise HttpError(resp, content, uri=self.uri)
arvados.errors.ApiError: <HttpError 422 when requesting https://su92l.arvadosapi.com/arvados/v1/job_tasks?alt=json&filters=%5B%5B%22sequence%22%2C+%22%3E%22%2C+0%5D%5D&offset=0 returned "#<ArgumentError: Invalid operand type 'Fixnum' for '>' operator in filters>">

It seems to work if I filter on 'sequence', '>', '0', but I wonder if that's based on string lexicographic ordering.

I think I should be able to use a numeric operand when applying these filters to numeric types. Discussing it in IRC, Ward and Tom seemed to expect the same as well.

Actions #1

Updated by Ward Vandewege almost 3 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #2

Updated by Peter Amstutz about 1 year ago

  • Release set to 60
Actions #3

Updated by Peter Amstutz about 2 months ago

  • Target version set to Future
Actions

Also available in: Atom PDF