-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
null not equal empty string (back compatibility issue) #1859
Comments
Yes, I found that with 2.2.0-pre - I needed to rewrite many of my stylesheets, since they relied on the At the least, there should be something in the release notes for 2.2.0 to say that stylesheets will need a minor reworking. Sorry for not reporting this when I first ran into it! |
@gravitystorm - thanks for the follow up. So, are you happy with the change and the ability to now filter out nulls by doing As far as API changes like this, I am collecting them at https://github.com/mapnik/mapnik/wiki/API-changes-between-v2.1-and-v2.2. I will add this one shortly. |
I'm not really happy with this kind of change. It breaks too many existing stylesheets from my point of view. |
@cquest - what operating system are you on? (so I can get you a new TileMill dev build to test). Also, @gravitystorm - I notice there are still a few usages of |
Tanks a lot for the fix. I'm using TileMill on OSX and will be happy to test the new version. |
@cquest - please find an OS X dev build of TileMill (using mapnik latest @ c6da53a) at: http://tilemill.s3.amazonaws.com/dev/TileMill-v0.10.1-78-gbb8c6ce.zip |
fyi @gravitystorm and @cquest - based on the mis-rendering of the openstreets-dc stylesheet even with this build I presume mapbox/carto#247 is still somehow present. |
TileMill-v0.10.1-78-gbb8c6ce.zip looks fine with my OSM-FR tilemill project. Thanks for the fix ! |
Great. Thanks for testing! On Jun 5, 2013, at 1:21 AM, cquest notifications@github.com wrote:
|
This change adds back the ability to throw out both empty strings and null values with the not equals statement like `[attr] != ''` Note: this does not mean null == '' because the needed compatibility fix only addresses the "not equals` operator to retain the historical usage of not matching nulls.
In Mapnik 2.2 you can now do
[attr] != null
to filter out true nulls after the fixes as part of #1642. But in older Mapnik you could not do[attr] != null
and instead had to match null by doing[attr] != ''
. Now[attr] != ''
only rejects empty strings and actually matches nulls since null != ''. Whether null should be == to '' is a bigger question than this issue, but an interesting one to consider in relation to #796This behavior causes a breaking change between Mapnik 2.1.x and 2.2.x and makes using stylesheets between them difficult since
[attr] != null
does not work in 2.1.x and older.Reported downstream at http://support.mapbox.com/discussions/tilemill/6202-tilemill-bug-on-null-postgis-values-after-update-to-v0101-59 from @cquest
So, need to figure out if adding back(wards) compatibility with
[attr] != ''
matching nulls is needed.The text was updated successfully, but these errors were encountered: