mountetna / magma

Data server with friendly data loaders
GNU General Public License v2.0
5 stars 2 forks source link

Graft fix query #101

Closed graft closed 5 years ago

graft commented 5 years ago

This PR solves a bug in the /query API that removed some items from the response incorrectly, due to outer-joining tables on foreign key criterion (correctly producing rows with NULL values) but then applying filters to these rows in WHERE clauses (incorrectly remove rows with some NULL values). See discussion of the problem in #100 - the resolution was to move filtering criterion into the JOIN ON clause for mapped columns, but to keep those criterion in WHERE clauses for filters on the table.

The final result was incompatible with the current plot code, so this has been waiting on the completion of the timur branch em-d3-v5.

graft commented 5 years ago

There are also some changes regarding the fog gem, which was previously loading a bunch of requirements (like fog-google) instead of just fog-aws. There are also some Etna logging changes (including hiding a database error instead of broadcasting it, wtf?).