VEuPathDB / EdaSubsettingService

A REST service to provide data and subsetting in the Exploratory Data Analysis Workspace
Apache License 2.0
0 stars 0 forks source link

Fix missing data resulting in missing rows (plus supporting no vars) … #11

Closed ryanrdoherty closed 3 years ago

ryanrdoherty commented 3 years ago

The primary fix in this PR is a refactor of the tabular endpoint's SQL to use a left join to ensure that at least one row for every record in the requested subset is returned by the tall tables. These new "null rows" are handled by the Java code, filling in empty strings in the tab delimited output for vars that have no data, even if no requested vars have data (IDs are still provided).

Another longstanding request to allow zero vars to be requested (output still gets one tabular row per subset record) is also fixed in this PR. Unit tests confirm that with various amounts of filled in data, and with zero or more vars requested, we always return the same number of rows.