github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/issues/1228#issuecomment-1072915936 | https://api.github.com/repos/simonw/datasette/issues/1228 | 1072915936 | IC_kwDOBm6k_c4_82Xg | 9599 | 2022-03-19T01:50:27Z | 2022-03-19T01:50:27Z | OWNER | Demo: https://latest.datasette.io/fixtures/facetable - which now has a column called `n`. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
810397025 | |
https://github.com/simonw/datasette/issues/1228#issuecomment-1072908029 | https://api.github.com/repos/simonw/datasette/issues/1228 | 1072908029 | IC_kwDOBm6k_c4_80b9 | 9599 | 2022-03-19T00:57:54Z | 2022-03-19T00:57:54Z | OWNER | Yes! That's the problem. I was able to replicate it like so: ``` echo '[{ "n": "one", "abc": 1 }, { "n": "one", "abc": 2 }, { "n": "two", "abc": 3 }]' | sqlite-utils insert column-called-n.db t - ``` <img width="564" alt="image" src="https://user-images.githubusercontent.com/9599/159100494-9a072e3c-7bad-4fc5-b90e-b5078c11fc44.png"> | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
810397025 | |
https://github.com/simonw/datasette/issues/1228#issuecomment-1072907680 | https://api.github.com/repos/simonw/datasette/issues/1228 | 1072907680 | IC_kwDOBm6k_c4_80Wg | 9599 | 2022-03-19T00:55:48Z | 2022-03-19T00:55:48Z | OWNER | ... unless your data had a column called `n`? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
810397025 | |
https://github.com/simonw/datasette/issues/1228#issuecomment-1072907610 | https://api.github.com/repos/simonw/datasette/issues/1228 | 1072907610 | IC_kwDOBm6k_c4_80Va | 9599 | 2022-03-19T00:55:29Z | 2022-03-19T00:55:29Z | OWNER | It looks to me like something is causing the faceting query here to return a string when it was expected to return a number: https://github.com/simonw/datasette/blob/32963018e7edfab1233de7c7076c428d0e5c7813/datasette/facets.py#L153-L170 I can't think of any way that a `count(*) as n` would turn into a string though! | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
810397025 |