Hi, Jan, The intention was to keep as much results as possible (instead of returning a nil pointer on any little problem). Clearly, there is at least one problem with it, that is if the select clause contains an error for every data partition, then we should return an error instead of returning an empty result table. This is a situation that is relatively easy to detect and I will implement it shortly.
You might want to check that the table object returned from the select operation has the expected number of columns. Not having the expected number of columns should be taken as a form of error. This might be a bit easier than calling selectClause::verify. John PS: SVN revision 314 contains the updates mentioned above. Please give it a try when you get the chance. On 8/26/2010 4:16 AM, Jan Steemann wrote: > Hi John, > > using Fastbit we found out that it is possible to run select queries with > column names that are invalid (i.e. not present columns). > For example, selecting columns a and b from a partition when only column a is > available will not result in an error. > > Therefore, one does not have an indication if the results of a particular > query can be trusted. > > > In src/mensa.cpp, in method ibis::table::select(const std::vector<const > ibis::part*>& mylist, const char *sel, const ibis::qExpr *cond) there is a > for loop that handles all columns in the select. > This will detect if an invalid column is accessed and will log an error if > the log level is high enough. Afterwards, it will continue the execution but > not stop it. > > There are also a few other places in this method that continue and not stop > execution even if an error (indicated by ierr!=0) occurrs. > > I think it would make more sense to stop the query execution in case of an > error rather than continuing it. > > If it is intentional to not stop the execution, is there a recommended way to > verfiy the select parts beforehand? > I found verify() and friends in src/selectClause.cpp and would think that one > could verify the select clause manually by calling selectClause::verify() > before the actual calling table::select() method. Is this how it is intended > or is there a chance to make ibis::table::select() return with an error code > or with an exception in case undefined columns are accessed? > > Thank you for info and best regards > Jan > > -- > Jan Steemann > [email protected] > Phone +49 2233 7933 752 | Fax +49 2233 7933 788 > > Globalpark AG | Kalscheurener Str. 19a | 50354 Huerth | Germany > Vorsitzender des Vorstands/Chief Executive Officer (CEO) | Dr. Lorenz Graef > Mitglieder des Vorstands/Board Member | Frank Kleinert, Frank Michael, Oliver > Trabert > Vorsitzender d. Aufsichtsrats/Chairperson of the Supervisory Board | > Dr. Richard C. Geibel | HRG Amtsgericht Koeln/Entered on Cologne | > Local Court Commercial Register | HRB 64032 > > GLOBALPARK - manage what matters | http://www.globalpark.de > > > _______________________________________________ > 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
