Thanks John, this is working indeed (i guess this is because when looking for the column name, it always catches the first one). I implemented a workaround in my client application right know, which detects duplicates and remap column index. This essentially ends up being the same as using fastbit_result_get_unsigned (the idea is to catch the first occurrence of a propery) but i only do it once per query, instead of once per fastbit_result_get_* call (one per value retrieved).
Thanks, -----Original Message----- From: K. John Wu [mailto:[email protected]] Sent: Tuesday, February 12, 2013 11:54 AM To: FastBit Users Cc: Dominique Prunier Subject: Re: [FastBit-users] SELECT DISTINCT prop,prop FROM part Hi, Dominique, Would you mind use fastbit_result_get_unsigned instead of fastbit_result_getUnsigned? This should temporarily fix the problem. We will have to look into a more permanent fix in the mean time. John On 2/11/13 2:34 PM, Dominique Prunier wrote: > Hi, > > > > I found a weird issue using bundle. When select twice the same > property, the result bundle gets created with a single colmn. > > > > For example, my test code is: > > > > FastBitQueryHandleq = fastbit_build_query("prop,prop", > "/tmp/partition", NULL); > > FastBitResultSetHandler = fastbit_build_result_set(q); > > *while*(fastbit_result_set_next_bundle(r) == 0) { > > std::cerr << "r:"<< fastbit_result_set_getUnsigned(r, 0)<< " "<< > fastbit_result_set_getUnsigned(r, 1) << "\n"; > > } > > fastbit_destroy_result_set(r); > > fastbit_destroy_query(q); > > > > which systematically fails for column 1 (with -1 because column > doesn’t exist in the bundle): > > > > r:1 *4294967295* > > r:2 *4294967295* > > > > As far as i understand, i debuged to the bundle create function, which > tests the selectClause::aggSize (which is 1) as opposed to > selectClause:: numTerms (which is 2): > > > > ibis::bundle* *ibis::bundle::create*(*const*ibis::query& q, *int*dir) { > > ... > > *else**if*(q.components().aggSize() == 1) > > bdl = *new*ibis::bundle1(q, dir); > > ... > > > > > > I’m not sure what should be fixed so that the exposed width of the > result set is actually the correct number of terms in the select > clause. Any idea ? > > > > Thanks, > > > > */Dominique Prunier/**//* > > APG Lead Developper > > Logo-W4N-100dpi > > 4388, rue Saint-Denis > > Bureau 309 > > Montreal (Quebec) H2J 2L1 > > Tel. +1 514-842-6767 x310 > > Fax +1 514-842-3989 > > [email protected] <mailto:[email protected]> > > www.watch4net.com <http://www.watch4net.com/> > > / / > > /This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise private information. If you have > received it in error, please notify the sender immediately and delete > the original. Any other use of this electronic mail by you is prohibited. > > //Ce message est pour le récipiendaire désigné seulement et peut > contenir des informations privilégiées, propriétaires ou autrement > privées. Si vous l'avez reçu par erreur, S.V.P. avisez l'expéditeur > immédiatement et effacez l'original. Toute autre utilisation de ce > courrier électronique par vous est prohibée./// > > > > > > _______________________________________________ > 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
