{"html_url": "https://github.com/simonw/sqlite-utils/issues/488#issuecomment-1254029808", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/488", "id": 1254029808, "node_id": "IC_kwDOCGYnMM5Kvvnw", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-21T17:45:20Z", "updated_at": "2022-09-21T17:45:41Z", "author_association": "OWNER", "body": "No, I'm going to say that this is a bug - it's WEIRD having a `integer` or `float` column containing an empty string. I'm OK changing that - I very much doubt anyone is relying on this functionality.\r\n\r\nSo no need for a new option here - just fixing the bug is sensible.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1373224657, "label": "`sqlite-utils transform` should set empty strings to null when converting text columns to integer/float"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/488#issuecomment-1254032378", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/488", "id": 1254032378, "node_id": "IC_kwDOCGYnMM5KvwP6", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-21T17:47:54Z", "updated_at": "2022-09-21T17:47:54Z", "author_association": "OWNER", "body": "New tests should go in: https://github.com/simonw/sqlite-utils/blob/main/tests/test_transform.py\r\n\r\nI think the implementation fix needs to go near here: https://github.com/simonw/sqlite-utils/blob/0b315d3fa83c1584eaeec32f24912898621e437a/sqlite_utils/db.py#L1770-L1775\r\n\r\nThe trick is going to be teaching that generated SQL to know which columns are `integer` or `float` and to convert `\"\"` to `null` as part of that operation. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1373224657, "label": "`sqlite-utils transform` should set empty strings to null when converting text columns to integer/float"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/488#issuecomment-1254033981", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/488", "id": 1254033981, "node_id": "IC_kwDOCGYnMM5Kvwo9", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-21T17:49:32Z", "updated_at": "2022-09-21T17:50:10Z", "author_association": "OWNER", "body": "It looks like SQLite has a `SELECT NULLIF(value, '')` function which returns `null` if that value is equal to `''`.\r\n\r\nWe need to only apply that function to columns that we know to be of type integer or float though - text columns containing empty strings should not be rewritten to null.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1373224657, "label": "`sqlite-utils transform` should set empty strings to null when converting text columns to integer/float"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/526#issuecomment-1254064260", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/526", "id": 1254064260, "node_id": "IC_kwDOBm6k_c5Kv4CE", "user": {"value": 536941, "label": "fgregg"}, "created_at": "2022-09-21T18:17:04Z", "updated_at": "2022-09-21T18:18:01Z", "author_association": "CONTRIBUTOR", "body": "hi @simonw, this is becoming more of a bother for my [labor data warehouse](https://labordata.bunkum.us/). Is there any research or a spike i could do that would help you investigate this issue?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459882902, "label": "Stream all results for arbitrary SQL and canned queries"}, "performed_via_github_app": null}