Filtering the UWS JobList by Phase and Last

Joshua Fraustro jfraustro at stsci.edu
Thu Jun 27 00:04:01 CEST 2024


For services that implement the UWS pattern, the job list returned at the root /{jobs} path may be filtered using three parameters:


  *   PHASE: return only jobs with the supplied ExecutionPhase
  *   AFTER: return jobs with a creationTime after the supplied datetime
  *   LAST: return the last N jobs, ordered by creationTime, descending

As described by the UWS document, under 2.2.2.1 Job List<https://www.ivoa.net/documents/UWS/20161024/REC-UWS-1.1-20161024.html#jobList>, “If multiple filters are specified by the client, then the server should return a jobs list which is the result of a logical AND of the various filter conditions”.

Consider the following basic job list of only execution phase. Assume it has been appropriately presorted by creationTime.

job5: phase=PENDING # newest
job4: phase=COMPLETED
job3: phase=PENDING
job2: phase=COMPLETED
job1: phase=COMPLETED # oldest

A client provides the following filters in his query:

/{jobs}?PHASE=COMPLETED&LAST=2

If the service performs these iteratively, which I think a programmer’s gut reaction would be, the orders could be:

  1.  Filter by PHASE, then by LAST, the result would be [job4, job2].
  2.  If the service evaluates by LAST, then by PHASE, the result would be [job4].

I know at MAST we use order 1, and doing some quick checking it appears that Vizier and GAVO do as well.

What I assume is meant by “logical AND” however, is closer to, “the intersection of the sets whose members are the results of the various filter conditions.” In which case the answer becomes:

?PHASE=COMPLETED
[job4, job2, job1]

AND

?LAST=2
[job5, job4]

==

[job4]

Is this the intended meaning? If it is, we should probably clarify the language as such, as that would be the ‘most correct’ interpretation of “logical AND”. If not, we would need to decide what the prescribed evaluation order is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ivoa.net/pipermail/grid/attachments/20240626/b37a42ed/attachment.htm>


More information about the grid mailing list