Bug 2610 - @ops on empty scalar statistics aggregates
Summary: @ops on empty scalar statistics aggregates
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-26 22:10 UTC by Frank Ch. Eigler
Modified: 2006-05-01 13:50 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ch. Eigler 2006-04-26 22:10:13 UTC
For arrays of aggregates, accessing a nonexistent value results in an error:

   a[2] <<< 2; @avg(a[3])

This is intentional, since @avg is considered undefined for a zero-element
list.  However, for scalars, we don't enforce this same thing:

   @avg(b) ; @max(b)

may spit out a generic division-by-zero error or a sentinel "0" value.
It should be made consistent with the vector-of-aggregates case, so that
only @count() is valid on an empty aggregate scalar.
Comment 1 Frank Ch. Eigler 2006-05-01 13:50:30 UTC
patched