Hi, Aditya, Yes. There is a problem with having an alias in this case. Thanks for the sample data. I am a little puzzled about this problem and will need some time to look into it. As soon as I have a fix, I will let you know.
John On 8/16/12 9:43 AM, vas wrote: > Hi, > > Using the JNI interface, giving an alias for count(*) does not work in > certain cases. For example, consider the following dataset (with 5 > columns: a,b,c.d.e): > > 1,2,"*","*","ab,ab-cd,ab-cd-ef,ab-cd-ef-70" > 2,3,"e,b","461715,126678","ab,ab-cd,ab-cd-hi,ab-cd-hi-84" > 3,2,"d","25153","ab,ab-cd,ab-cd-hi,ab-cd-hi-84" > 4,1,"*","*","bc,bc-de,bc-de-*,bc-de-*-4573" > 5,2,"b","2552016","ab,ab-cd,ab-cd-hi,ab-cd-hi-84" > 6,3,"b","1257523","ab,ab-cd,ab-cd-hi,ab-cd-hi-84" > 7,2,"a","735130","ab,ab-cd,ab-cd-hi,ab-cd-hi-84" > > However, the following query will actually return no tuples (even > though 1 tuple should be returned specifying the correct count): > "select count(*) as c where e contains 'ab' and d contains '735130'. > > Giving no alias for count(*) does return back 1 row but since the name > of the column is not given, there is no way of extracting the actual > count from the FastbitResultRow class. Calling > getColumnAsInt(count(*)) always returns 0 no matter what so giving > count(*) as the column name does not work. > > Is there a workaround for this issue as I only need this to work for > count(*) queries without any group bys? For certain queries, adding > the alias does return the correct answer but I am not able to > determine when this is the case. The same behaviour is present in the > ibis client as well where adding an alias return no results for > certain queries and the correct result for other queries. > > Thanks, > Aditya > _______________________________________________ > 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
