Hi John,

It works like a charm :)

I have another question. I am wondering if there is any good way to
get row number (index or id) as a query result. For example, some DB
returns corresponding row ids (or index) with the following statement:
SELECT rowid, * FROM value1

I haven't tried yet but I think I may get such information by creating
a cursor. But, I am wondering if there is a function to do the same
thing.

Thanks,
Jong



On Fri, Mar 22, 2013 at 12:13 PM, K. John Wu <[email protected]> wrote:
> Hi, Jong,
>
> Please do a 'svn update.'  You should be getting SVN revision 617.
> There is a quick fix to the problem with incorrect index size.  Let me
> know if it works for you.
>
> Thanks.
>
> John
>
>
> On 3/19/13 1:28 PM, Jong Choi wrote:
>> Hi,
>>
>> I am trying to verify if an index is there before querying but haven't
>> found a good solution yet. So far, I tried to see
>> ibis::column::indexSize() but I got "-1". Is there any good way to
>> check such thing?
>>
>> Just for your reference, here is part of my code:
>>
>> std::auto_ptr<ibis::tablex> ta(ibis::tablex::create());
>> int buf[] = {10, -21, 32, -43, 54, -65, 76, -87, 98, -127};
>>
>> ta->addColumn("col1", ibis::INT);
>> ta->append("col1", 0, 10, buf);
>>
>> std::auto_ptr<ibis::table> tb(ta->toTable());
>> tb->buildIndex("col1");
>>
>> ibis::constPartList parts;
>> int ierr = tb->getPartitions(parts);
>> assert(ierr > 0);
>>
>> for (ibis::constPartList::const_iterator it = parts.begin(); it !=
>> parts.end(); ++it)
>> {
>>         ibis::part::info *info = (*it)->getInfo();
>>         std::clog << "name :" << info->name << std::endl;
>>
>>         int nColumns = (*it)->nColumns();
>>         for (int i = 0; i < nColumns; i++)
>>         {
>>             ibis::column * col = (*it)->getColumn(i);
>>             std::clog << "size :" << col->indexSize() << std::endl;
>>         }
>> }
>>
>> // Query
>> ibis::table* res = tb->select("val", "val > 0");
>> ...
>>
>> I will appreciate any advice or help.
>>
>> Thanks,
>>
>> Jong
>> _______________________________________________
>> FastBit-users mailing list
>> [email protected]
>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>



-- 
Jong Youl Choi
Scientific Data Group
Computer Science and Math Division
Oak Ridge National Laboratory
Homepage: http://www.ornl.gov/~jyc/
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to