Trashing sort and uniq attribute on filter-spec
Francis J. Lacoste
francis.lacoste at Contre.COM
Tue Jan 15 22:57:00 CET 2002
I come across a problem while implementing the global filter feature:
the 'sort' attribute in the filter-spec element.
This is an awkward feature which permit to sort the DLF before filtering
it further (using the standard operator, ge, eq, match, uniq, etc.)
It has several problems:
How should we handle filter chain (that is multiple stacked filters)
that have sort attribute?
If you use the sort attribute, the timegroup operator can't work
(because it breaks the DLF sorted by timestamp assumption).
The sort attribute is a complex feature which was there only to work
with the 'uniq' filter operator. All the other group operations (all except timegroup) and the other filter operations are insensitive to the sort order
of the DLF. The uniq filter operation returns only the first unique
values for a particular set of records.
I'm not sure that the sort attribute (and the uniq filter operation) are
of much use. For one thing, the sort attribute isn't currently used by
any report specifications. The uniq filter operation is only used by
two reports in the email superservice
(top-avg-delay-by-to-relay-and-to-domain,top-largest-email-exchange)
But I'm not sure they are even useful in that case. (I even think that it may
be a "bug" to use them in one of the report.)
In the top-largest-email-exchange report, we would just have to use
a max group operator instead of sum.
In the top-avg-delay... report, I don't understand why it's used.
Bottom line: I don't see practical use of the uniq filter operation
and of the sort attribute. If this was eventually needed, a
DerivedSchema could be use to implement similar functionality, so it's
not a great loss. And we can drop near 200k lines of code.
Any other opinions?
--
Francis J. Lacoste
francis at Contre.COM
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.logreport.org/pipermail/development/attachments/20020115/4cf17aed/attachment.bin
More information about the Development
mailing list