Hi John,

Thanks for the detailed explanation!
In my program, from here on, I will use aliases with those functions.

Best regards,
Valeria


2010/4/28 K. John Wu <[email protected]>

> Hi, Valeria,
>
> Thanks for noticing this change.  I should have made this part of the
> documentation and am forwarding this to the mailing list so that
> everyone is made aware of this.
>
> To make the return from a select function suitable for select
> operation again, we need to name the columns in a way that avoids
> special characters.  Normally, the users who intend to do this should
> give aliases to the functions, e.g.,
>
> select sum(in_bytes) as total_in, avg(out_bytes) as avg_out ...
>
> However, if there is no alias provided, the internal generated names
> take on the form of function name followed by an integer, such as sum1
> and avg2.  The automatically inserted "count(*)" will appear as "count0".
>
> Please consider using aliases if you expect the output to remain
> consistent.  If you have a suggestion on how the columns should be
> named, please let us know.
>
> Thanks.
>
> John
>
>
> On 4/27/2010 1:56 AM, Valeria Lorenzetti wrote:
> > Hello John,
> > I was doing some tests and I noticed the change in column names when
> > using aggregate functions like SUM, AVG, etc.
> >
> > In my program I used dumpNames() to print column names.
> >
> > Example of SELECT statment: "SUM(IN_BYTES),AVG(OUT_BYTES)"
> >
> > Column names printed by dumpNames():
> > *sum1, avg2, count0*
> > 0,247.5,2
> >
> > Expected output:
> > *SUM(IN_BYTES), AVG(OUT_BYTES), count(*)*
> > 0,247.5,2
> >
> > I'm pretty sure it was in such way in previous versions of the library.
> > Not a big problem, but I wanted to tell you about this.
> >
> > Thanks,
> > Valeria Lorenzetti
> >
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to