Hi, Patrik,

I am not sure that I understand your question.  My guess is that
ibis.cpp seems to know how to get back the strings, but your own
program does not.  Is that right?  Or maybe, the cursor class you are
using somehow couldn't get a pointer to the dictionary object?  If
this is the case, then the thing to do is to figure out a way to pass
the pointer to the column object within the cursor object.

In general, using integer representation for strings is a more
efficient especially when there are only a few distinct values.

Please clarify.  Feel free to send us a sample code if your question
could be boiled down to a small piece of code.

John


On 2/6/13 6:37 AM, Patrik Nisen wrote:
> Hi,
> 
> I have a text column, which fastbit converted into a category column
> when building indexes due to the relatively low cardinality. I am
> trying to access the data through the table interface, iterating the
> results with a cursor object. However, the cursor returns only the
> integer representation instead of the original text value. Executing
> the same query with the ibis tool seems to be working fine.
> 
> I tried to understand the issue and here's what I found, please
> correct me if I got this wrong.
> 
> I construct the table myself using the bord class. The constructor
> goes through the select clause and creates the columns for the table.
> In case of a category column (starting from bord.cpp:186) it converts
> the column to UINT and sets the dictionary for conversion. The data is
> then appended to the table.
> 
> When I want to iterate through the results, I create a cursor object
> and use fetch method to populate a row. However, in cursor::fillRow
> the loop only finds the UINT column and fills in the integer value
> (bord.cpp:11148). The ibis tool seems to work, because the
> column::dump checks if a dictionary is present and uses that if
> available (bord.cpp:2301).
> 
> How could this be fixed? Is it fine to fill the catsnames and
> catsvalues if the column is UINT and a dictionary is present, or is
> there other uses for the dictionary as well?
> 
> Thank you.
> 
> Best regards
> 
> Patrik Nisen
> 
> 
> 
> 
> _______________________________________________
> 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