{"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-852237347", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 852237347, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MjIzNzM0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-01T15:52:50Z", "updated_at": "2021-06-01T15:52:50Z", "author_association": "OWNER", "body": "Fixed in https://github.com/simonw/datasette/commit/d1d06ace49606da790a765689b4fbffa4c6deecb", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-851133125", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 851133125, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MTEzMzEyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-31T03:01:48Z", "updated_at": "2021-05-31T03:01:48Z", "author_association": "OWNER", "body": "I think it's worth getting `?_trace=1` to work with streaming CSV - this would have helped me spot this issue a long time ago.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-851131999", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 851131999, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MTEzMTk5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-31T02:57:25Z", "updated_at": "2021-05-31T02:57:25Z", "author_association": "OWNER", "body": "I'm having a really hard time figuring out how to unit test this - ideally I'd monitor which SQL queries are executed using the tracing mechanism, but that's not set up to work with anything other than HTML or JSON outputs: https://github.com/simonw/datasette/blob/c5ae1197a208e1b034c88882e3ac865813a40980/datasette/tracer.py#L125-L134", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-851129464", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 851129464, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MTEyOTQ2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-31T02:48:06Z", "updated_at": "2021-05-31T02:48:06Z", "author_association": "OWNER", "body": "Actually there is precedent for swapping out `request.scope` for a new scope, as seen here in the routing code: https://github.com/simonw/datasette/blob/c5ae1197a208e1b034c88882e3ac865813a40980/datasette/app.py#L1117-L1122", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-851129019", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 851129019, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MTEyOTAxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-31T02:46:38Z", "updated_at": "2021-05-31T02:46:38Z", "author_association": "OWNER", "body": "I think the right way to do this is to construct a new `Request` with a modified ASGI scope: https://github.com/simonw/datasette/blob/c5ae1197a208e1b034c88882e3ac865813a40980/datasette/utils/asgi.py#L88-L99", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-851128524", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 851128524, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MTEyODUyNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-31T02:44:44Z", "updated_at": "2021-05-31T02:44:44Z", "author_association": "OWNER", "body": "Now that I have `?_nofacets=1` I can use that to fix this. The challenge is that in this block of code I need to modify the incoming request's query string arguments, which isn't something I've done before: https://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/datasette/views/base.py#L263-L270\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-850778311", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 850778311, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDc3ODMxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-29T06:12:21Z", "updated_at": "2021-05-29T06:12:21Z", "author_association": "OWNER", "body": "It's not just facets, I think it's trying to execute suggested facets too!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-850778273", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 850778273, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDc3ODI3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-29T06:11:59Z", "updated_at": "2021-05-29T06:11:59Z", "author_association": "OWNER", "body": "Related issue: https://github.com/simonw/datasette/issues/263 - \"Facets should not execute for ?shape=array|object\"", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1349#issuecomment-850778230", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1349", "id": 850778230, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDc3ODIzMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-29T06:11:28Z", "updated_at": "2021-05-29T06:11:28Z", "author_association": "OWNER", "body": "Relevant code: https://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/datasette/views/base.py#L263-L315", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 906385991, "label": "CSV ?_stream=on redundantly calculates facets for every page"}, "performed_via_github_app": null}