Re: guidance for using TTreeSQL ?

From: Rob Mahurin <rob_at_jlab.org>
Date: Fri, 25 Feb 2011 15:02:35 -0500


On Thu, Feb 24, 2011 at 01:05:17PM -0600, Philippe Canal wrote:
> Both problems were unexpected and have now been fixed in the trunk
> and in the v5.28 patch branch.
>
> The temporary table issue is due to the fact that mysql does not
> give access a list of those table the easy way (i.e. show table does
> not show them). The GetColumnIndice was an unfortunate oversight
> when reading table that has not been created by TTreeSQL.

Thank you Philippe!

I seem to still be unable to get text data from temporary tables:

	root[] TSQLStatement* stmt = serv->Statement(
	     "create temporary table temp as "
	     "select 42 as number, 'something' as text")
	root[] stmt->Process()
	(Bool_t)1
	root[] TTreeSQL t(serv, "test", "temp")
	root[] t.Print()
	**************************************************************************
	*Tree    :temp    : Database read from table: temp                       *
	*Entries :      1 : Total =            1445 bytes  File  Size =        0 *
	*        :        : Tree compression factor =   1.00                     *
	**************************************************************************
	*Br    0 :number  : number/I                                             *
	*Entries :      1 : Total  Size=        573 bytes  One basket in memory  *
	*Baskets :      0 : Basket Size=      32000 bytes  Compression=   1.00   *
	*........................................................................*
	*Br    1 :text    : text[9]/C                                            *
	*Entries :      1 : Total  Size=        567 bytes  One basket in memory  *
	*Baskets :      0 : Basket Size=      32000 bytes  Compression=   1.00   *
	*........................................................................*
	root[] t.Scan()
	************************************
	*    Row   *    number *      text *
	************************************
	*        0 *        42 *           *
	************************************
	(Long64_t)1

Thanks,
Rob

-- 
Rob Mahurin
University of Manitoba, Department of Physics
and Thomas Jefferson National Accelerator Facility
12000 Jefferson Avenue Suite 6, Newport News, VA 23606
office 757-269-6510; elsewhere 865-207-2594; rob_at_jlab.org
Received on Fri Feb 25 2011 - 21:02:50 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 25 2011 - 23:50:01 CET