Hi, Jon,

Thought about this for a while, the obvious solution might be for you 
to construct the selectClause from your select string.  From there you 
can get the information you want.  The current doxygen documentation 
is available at

<http://crd.lbl.gov/~kewu/fastbit/doc/html/classibis_1_1selectClause.html>

The names of the variables used as group-by keys can be retrieved 
using ibis::selectClause::getGroupbyKeys.  The string form of each 
select term can be obtained through the function 
ibis::selectClause::termDescription.

It might make sense to expose some of these function through 
ibis::query object or have ibis::query exposes its ibis::selectClause 
object in a read-only mode.  If you have any suggestions, please let 
me know.

John


On 6/7/11 2:16 PM, Jon Strabala wrote:
> I have a request for two (2) new functions as part of your fastbit
> library - of course I am indifferent on what the actual names are
>
> A) *ibis::table::stringList nms =
> tbl.**columnSelectStatementFragment**();*
>
> B) *ibis::table::booleanList tps = tbl.columnIsPartOfGroupBy();*
>
> In thula.cpp we can do the following (all my code is based on the
> thula example) :
>
> tbl->describe(std::cout); // ask the table to describe itself -
> example output below
>
> Table (in memory) W8IRFd (GROUP BY TRUNC(SUM(CALLDURR)/60,2) AS
> MINUTES, DESTINATION on table YW4Agt (table::select)) contsists of 2
> columns and 520 rows
> MINUTES DOUBLE  trunc((SUM(CALLDURR) / 60), 2)
> DESTINATION     TEXT    DESTINATION
>
> ibis::table::stringList nms = tbl.columnNames();
> ibis::table::typeList tps = tbl.columnTypes();
>
>
> So I know that tbl->describe(std::cout) describes a) tbl.columnNames()
> and b) tbl.columnTypes() - BUT there seems no to get the final
> component or actual select component function like:
> *
> *
> *ibis::table::stringList nms = tbl.**columnSelectStatementFragment**();*
>
> This would return a set of items like "trunc((SUM(CALLDURR) / 60),
> 2)", "DESTINATION" - the last component of tbl->describe(std::cout);
>
> I also have a critical need to determine what column or columns were
> included in the implicit group by list as such I would request another
> function like:
>
> *ibis::table::booleanList tps = tbl.columnIsPartOfGroupBy();*
>
> This would return "false", "true" as I think DESTINATION in the above
> example is in the implicit group by.
>
> Perhaps theses functions are already available in another form if
> not,it would be very helpful to me to have them added to the source tree.
>
> If they are easy to get via other calls I would greatly appreciate a
> prototype function or pseudo code
>
>
>
> Thanks in Advance
>
>
>
> _______________________________________________
> 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