Bug report #16008

maximum() function on an empty INT field returns -1.79769313486232e+308

Added by Paolo Cavallini over 7 years ago. Updated over 7 years ago.

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

Revision 64f8b4db
Added by Nyall Dawson over 7 years ago

Fix incorrect aggregate values returned for empty sets (fix #16008)

Now empty sets return NULL values for invalid statistics

Revision 651d1edc
Added by Nyall Dawson over 7 years ago

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 over 7 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 over 7 years ago

Yes, no record.

#3 Updated by Nyall Dawson over 7 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF