html_url,issue_url,id,node_id,user,user_label,created_at,updated_at,author_association,body,reactions,issue,issue_label,performed_via_github_app https://github.com/simonw/sqlite-utils/issues/488#issuecomment-1254029808,https://api.github.com/repos/simonw/sqlite-utils/issues/488,1254029808,IC_kwDOCGYnMM5Kvvnw,9599,simonw,2022-09-21T17:45:20Z,2022-09-21T17:45:41Z,OWNER,"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. So no need for a new option here - just fixing the bug is sensible.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1373224657,`sqlite-utils transform` should set empty strings to null when converting text columns to integer/float, https://github.com/simonw/sqlite-utils/issues/488#issuecomment-1254032378,https://api.github.com/repos/simonw/sqlite-utils/issues/488,1254032378,IC_kwDOCGYnMM5KvwP6,9599,simonw,2022-09-21T17:47:54Z,2022-09-21T17:47:54Z,OWNER,"New tests should go in: https://github.com/simonw/sqlite-utils/blob/main/tests/test_transform.py I think the implementation fix needs to go near here: https://github.com/simonw/sqlite-utils/blob/0b315d3fa83c1584eaeec32f24912898621e437a/sqlite_utils/db.py#L1770-L1775 The 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. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1373224657,`sqlite-utils transform` should set empty strings to null when converting text columns to integer/float, https://github.com/simonw/sqlite-utils/issues/488#issuecomment-1254033981,https://api.github.com/repos/simonw/sqlite-utils/issues/488,1254033981,IC_kwDOCGYnMM5Kvwo9,9599,simonw,2022-09-21T17:49:32Z,2022-09-21T17:50:10Z,OWNER,"It looks like SQLite has a `SELECT NULLIF(value, '')` function which returns `null` if that value is equal to `''`. We 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.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1373224657,`sqlite-utils transform` should set empty strings to null when converting text columns to integer/float, https://github.com/simonw/datasette/issues/526#issuecomment-1254064260,https://api.github.com/repos/simonw/datasette/issues/526,1254064260,IC_kwDOBm6k_c5Kv4CE,536941,fgregg,2022-09-21T18:17:04Z,2022-09-21T18:18:01Z,CONTRIBUTOR,"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?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",459882902,Stream all results for arbitrary SQL and canned queries,