You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible/stats
Vini Brasil 535874be6f
Reject unknown imported cities from queries (#2675)
* Reject unknown imported cities from queries

This commit fixes a bug where the city report returned `N/A` entries.
The functions that build imported data queries were using SQL
`COALESCE`, assuming city data is `NULL` when unknown, when actually its
unknown value is `0`.

This commit addresses the problem using SQL `NULLIF` combined with the
previous `COALESCE` call. With this change both `0` and `NULL` are
treated as unknown.

Since 1cb07efe6d cities can be `NULL`, but
previously we saved `0` as unknown.

Closes #1960

* Add entry to CHANGELOG

* Ignore cyclomatic complexity Credo check
4 years ago
..
aggregate.ex Refine parallel application-side joins (#2564) 4 years ago
base.ex Replace empty OS/screen size/Browser with `(not set)` in UI/API/exports (#2646) 4 years ago
breakdown.ex Fix 'field key does not exist' error (#2674) 4 years ago
clickhouse.ex Override stats_start_date in CRM (#2310) 4 years ago
compare.ex [Continued] Google Analytics import (#1753) 5 years ago
current_visitors.ex Implement dashboard with new stats module 5 years ago
filter_parser.ex Improve user input validation (#2291) 4 years ago
filter_suggestions.ex Trim goals when creating and retrieving from the DB (#2382) 4 years ago
filters.ex Pageview custom dimensions (#1816) 5 years ago
fragments.ex Add API support for intervals (#2417) 4 years ago
imported.ex Reject unknown imported cities from queries (#2675) 4 years ago
interval.ex Add support for intervals (#1574) 4 years ago
mod.ex Implement dashboard with new stats module 5 years ago
props.ex Fix unknown bind meta (#2654) 4 years ago
query.ex Add OTEL tracing to breakdown functions (#2544) 4 years ago
timeseries.ex Refine parallel application-side joins (#2564) 4 years ago