{"html_url": "https://github.com/simonw/datasette/issues/1246#issuecomment-787611153", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1246", "id": 787611153, "node_id": "MDEyOklzc3VlQ29tbWVudDc4NzYxMTE1Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-01T03:30:57Z", "updated_at": "2021-03-01T03:30:57Z", "author_association": "OWNER", "body": "I'm going to try a new pattern for testing this, enabled by #1151 - the test will create a new named in-memory database, write some records to it and then run some test facets against that. This will save me from having to add yet another fixtures table for this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 817597268, "label": "Suggest for ArrayFacet possibly confused by blank values"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1246#issuecomment-786840734", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1246", "id": 786840734, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njg0MDczNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T19:12:39Z", "updated_at": "2021-02-26T19:12:47Z", "author_association": "OWNER", "body": "Could I take this part:\r\n```python\r\n suggested_facet_sql = \"\"\" \r\n select distinct json_type({column}) \r\n from ({sql}) \r\n \"\"\".format( \r\n column=escape_sqlite(column), sql=self.sql \r\n ) \r\n```\r\nAnd add `where {column} is not null and {column} != ''` perhaps?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 817597268, "label": "Suggest for ArrayFacet possibly confused by blank values"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1246#issuecomment-786840425", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1246", "id": 786840425, "node_id": "MDEyOklzc3VlQ29tbWVudDc4Njg0MDQyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-26T19:11:56Z", "updated_at": "2021-02-26T19:11:56Z", "author_association": "OWNER", "body": "Relevant code: https://github.com/simonw/datasette/blob/afed51b1e36cf275c39e71c7cb262d6c5bdbaa31/datasette/facets.py#L271-L295", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 817597268, "label": "Suggest for ArrayFacet possibly confused by blank values"}, "performed_via_github_app": null}