Bug report #16008
maximum() function on an empty INT field returns -1.79769313486232e+308
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Expressions | ||
Affected QGIS version: | 2.18.2 | Regression?: | No |
Operating System: | Debian | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23923 |
Description
It should return 0, probably; certainly not a decimal value.
Associated revisions
Fix incorrect aggregate values returned for empty sets (fix #16008)
Now empty sets return NULL values for invalid statistics
Fix incorrect aggregate values returned for empty sets (fix #16008)
Now empty sets return NULL values for invalid statistics
(cherry-picked from 64f8b4)
History
#1 Updated by Andreas Neumann almost 8 years ago
you mean in case of an empty data set - no records?
I think it should return a NULL or undefined value, not 0 - or an error message.
0 is not automatically correct in all cases.
#2 Updated by Paolo Cavallini almost 8 years ago
Yes, no record.
#3 Updated by Nyall Dawson almost 8 years ago
- Status changed from Open to Closed
Fixed in changeset 64f8b4dbad2336ce765d8f3beaac1b085f54f03f.