On Dec 2, 2010, at 8:54 AM, David Jeske wrote:

One other issue I forgot to ask about...  it says:

int, long, float and double data is ordered by ascending numeric value.

This seems really convenient, but how do you plan to achieve this? You might 
add a comment about your method.

For example, sorting a long (64bit int) and double (64 bit float) by converting 
the long to double will produce invalid sort results for longs which overflow 
the double bits and truncate. It seems pulling off this feat would require 
detecting when the conversion to double will overflow a double and then convert 
to an unlimited precision format for the comparison. Is this what you are doing?


Each is individually sorted, doubles aren't compared to longs.   A field is 
either a double, or a long.  It is not both unless it is a Union, in which case 
the sort order is defined by the order of the union branches, then the 
individual types.



Reply via email to