Bug report #14487
NULL Strings in Mif files don't interact well with expressions (regression)
|Affected QGIS version:||2.14.0||Regression?:||No|
|Operating System:||windows and linux||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22463|
I have a mif file that is used in training and prior to 2.14 we would select polygons with no name by using
"name" is NOT NULL
in the expression builder. In 2.14 this now selects all the features including the 23 with empty/null names. You also can't do a work round like
length("name") = 0
as none of the features match.
Saving the data as a Shapefile makes everything work as expected.
I've attached the mif/mid files.
#1 Updated by Nyall Dawson over 4 years ago
- Resolution set to invalid
- Status changed from Open to Closed
Looking at this - there's no NULL names in the file. There's names which are empty strings, but that's different to null.
length("name") > 0 works for me, it selects 147 features
"name" <> '' also works (selects same 147 features)
I'm not sure why this would have worked in earlier versions (perhaps it was a change in the underlying GDAL library), but there's no reproducable bug here.