Bug report #981
Attribute Table sorting not working as expected
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||11040|
Clicking on column headers does not sort properly unless
1. character type columns have no blanks, or
2. number type columns are strictly numeric digits and the negative sign (no scientific notation or NAN) Note that currently null values are shown as 0, at least on PostGIS data.
It usually takes several clicks on the header to show the problem.
#3 Updated by Steven Mizuno almost 14 years ago
- Resolution set to fixed
- Status changed from Open to Closed
For number types, I have tried a mix of standard numeric notation and scientific notation and find that the sorting is correct, as long as there aren't the special values (like NaN, Infinity - note that infinity doesn't show in the attribute table view). Null cells sort at top or bottom depending on sort direction.
I believe that the special values are not very likely to be seen in the GIS world, so I won't pursue this any farther.
I can't be sure how text columns sort on null values (blank cells) as the word NULL is filled in for null data, so all cells have text in them. Therefore they sort properly.
Since numbers now sort properly, I consider this closed.