{"comment":{"created_at":"2011-10-11T16:37:00Z","body":"[springmeyer] artem is going to test/review before release.","updated_at":"2011-10-11T16:37:00Z","url":"https://api.github.com/repos/artemp/mapnik/issues/comments/2367748","id":2367748,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"}},"action":"created","issue":{"number":794,"created_at":"2011-10-11T16:36:57Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Over time mapnik value_type has gained the ability to store null types and boolean types, but full support appears unfinished at least in the postgis plugin (https://github.com/mapbox/carto/issues/75).\r\n\r\nAcross datasources that support nulls and booleans we should be able to do:\r\n\r\nMatch nulls: \r\n{{{\r\n<Filter>[field] is null</Filter>\r\n}}}\r\n\r\nMaybe: Match nulls and other types that evaluated to false\r\n{{{\r\n<Filter>not [field]</Filter>\r\n}}}\r\n\r\nMatch non nulls:\r\n{{{\r\n<Filter>not [field] is null</Filter>\r\n# and after #796:\r\n<Filter>[field] is not null</Filter>\r\n}}}\r\n\r\nNote: this should likely not result in hits because in postgres you have to use `is` to trigger null matching (but this is an acceptable regression for now I feel) \r\n{{{\r\n<Filter>[field] != null</Filter>\r\n# and \r\n<Filter>[field] = null</Filter>\r\n}}}\r\n\r\nMatch booleans:\r\n{{{\r\n<Filter>[field] = true</Filter>\r\n# or\r\n<Filter>[field] != false</Filter>\r\nor\r\n<Filter>[field] != true</Filter>\r\n# or\r\n<Filter>[field] = false</Filter>\r\n}}}\r\n\r\n * Initial NULL support landed in r657. This started skipping features with null values and broke osm.xml usage at the time (http://lists.berlios.de/pipermail/mapnik-devel/2008-February/000500.html)\r\n\r\n * Fixing rendering of zeros (#89) lead to a refactor of null support in r693, but postgis driver was not updated to stop skipping null value attributes even though `mapnik::value_null` was added. \r\n\r\n * And filter support for NULL's was never finished: #318\r\n\r\n * Boolean support first landed in r660. However we still lack Boolean support for attribute_descriptors for datasources (#795), and featureset support in datasources that support boolean types (postgres).\r\n\r\n\r\nOverall issues:\r\n\r\n1) how to allow proper filtering on boolean and null types consistently across all datasource plugins\r\n\r\n2) whether to make optimizations like not storing features attributes with null values\r\n\r\n3) mapnik does not currently offer much support for writing data, but if/when it does we need to insure the proper formatting and maintenance of types from feature output (e.g avoiding collapsing boolean types to integer of 0/1 in feature attribute display).\r\n\r\n4) conversion of booleans and null to proper types in bindings (e.g. NULL to python None - r3019)\r\n\r\nActionable:\r\n\r\n  * NEEDS REVIEW - Datasource plugins need to start using `mapnik::value_null` (currently nothing uses it)\r\n \r\n  * RESOLVED - Python bindings need to support conversion of NULL to None (r3019), and bool to bool (r3022)\r\n\r\n  * RESOLVED - SQLite driver overall needs to store mapnik::value_null instead of writing empty strings.\r\n \r\n  * RESOLVED - PostGIS featureset.cpp needs to stop ignoring null values\r\n\r\n  * RESOLVED - PostGIS datasource.cpp needs to report booleans as booleans not integers\r\n\r\n  * RESOLVED - Need to support reporting attributes of Boolean type (#795)","comments":4,"title":"Revisit NULL and Boolean types handling","updated_at":"2011-10-11T16:37:00Z","url":"https://api.github.com/repos/artemp/mapnik/issues/794","id":1878212,"assignee":null,"milestone":{"number":14,"created_at":"2011-10-11T15:50:49Z","due_on":"1970-01-01T09:21:58Z","title":"Mapnik 2.0.1","creator":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"url":"https://api.github.com/repos/artemp/mapnik/milestones/14","open_issues":13,"closed_issues":0,"description":"First stable/bugfix release in the 2.0.x series. \r\n\r\nMay be superseded by 2.1.x if sufficient new features are also ready.","state":"open"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/artemp/mapnik/issues/794","labels":[{"name":"Core_Library","url":"https://api.github.com/repos/artemp/mapnik/labels/Core_Library","color":"FFFFFF"}],"state":"open"},"legacy":{"issue_id":1878212,"comment_id":2367748}}