Return-Path: X-Original-To: apmail-oodt-dev-archive@www.apache.org Delivered-To: apmail-oodt-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A511A91EB for ; Fri, 16 Mar 2012 05:57:06 +0000 (UTC) Received: (qmail 72847 invoked by uid 500); 16 Mar 2012 05:57:06 -0000 Delivered-To: apmail-oodt-dev-archive@oodt.apache.org Received: (qmail 72809 invoked by uid 500); 16 Mar 2012 05:57:06 -0000 Mailing-List: contact dev-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@oodt.apache.org Delivered-To: mailing list dev@oodt.apache.org Delivered-To: moderator for dev@oodt.apache.org Received: (qmail 53722 invoked by uid 99); 16 Mar 2012 05:46:36 -0000 Content-Type: multipart/alternative; boundary="===============8119484025302076771==" MIME-Version: 1.0 Subject: Re: Review Request: OODT-410: DataSourceCatalog compatible with HypersonicSQL From: "Ricky Nguyen" To: "Paul Ramirez" , "brian Foster" , "Ricky Nguyen" , "Thomas Bennett" Date: Fri, 16 Mar 2012 05:46:36 -0000 Message-ID: <20120316054636.7140.77985@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org X-ReviewRequest-URL: https://reviews.apache.org/r/4358/ Cc: "Chris Mattmann" ,"oodt" In-Reply-To: <20120315003526.5765.66157@reviews.apache.org> References: <20120315003526.5765.66157@reviews.apache.org> --===============8119484025302076771== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On 2012-03-15 00:35:26, brian Foster wrote: > > Why can't DataSourceCatalog be extended and just modified per hypersoni= c needs?... what are the differences exactly between DataSource and Hyerson= ic versions of the Catalogs? > = > Chris Mattmann wrote: > Hey Brian, great question. The reality is that this catalog was hidde= n away in the File Manager test suite inside of TestDataSourceCatalog. Ther= e was something wiggy about the DataSourceCatalog code that Hypersonic SQL = didn't like so I had to extend DataSourceCatalog for internal testing since= it made sense to use Hypersonic SQL for that (could load up the DBMS in me= mory, etc.) I know that there was like 1 method that used incompatible SQL = syntax that Hypersonic SQL didn't like. Then when I overrode that one metho= d, I had to override like 4-5 others to inject my subclass method into the = call chain for that which is what you see in the patch. It seems that DataS= ourceCatalog has since evolved and it's entirely possible that it would sup= port Hypersonic SQL now, so here's what I see as 2 options: > = > 1. we try and simply remove Hypersonic SQL catalog period, and then s= ee if the TestDataSourceCatalog passes. If it does, this issue is moot and = I will close this ReviewBoard and the issue. > = > 2. If #1 doesn't succeed, and suggests changes, we could: > a) flow those changes into DataSourceCatalog -- someone would have = to have time to do that :) It also could happen later; or > b) suggest that since this catalog exists and we know it works, tem= porarily in 0.4 and ongoing until someone refactors or improves DataSourceC= atalog ship the HypersonicSQLFriendlyCatalog for folks who want to use it. > = > Sound right? Thoughts? > = > brian Foster wrote: > i'd be cool with you checking it in for now with a TODO at the top of= the class and maybe a JIRA issue to merge the 2 at some point > = > Chris Mattmann wrote: > Cool, I will try and use the DataSourceCatalog, see if it passes, and= if so, just forget this one. If it doesn't pass, I'll consider the above y= our +1 and then move forward with this. > > = > Chris Mattmann wrote: > Hey Brian, here was the issue, check it: > = > java.sql.SQLException: Not in aggregate function or group by clause: = org.hsqldb.Expression@16ba5c7a in statement [SELECT COUNT(DISTINCT p.produc= t_id) AS numResults FROM GenericFile_metadata p ORDER BY p.product_id DESC ] > at org.hsqldb.jdbc.Util.sqlException(Unknown Source) > at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source) > at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source) > = > Hypersonic SQL doesn't like COUNT functions and ORDER BY to be used t= ogether. See: http://www.dcm4che.org/jira/browse/ARR-37 > = > So, what I did with this catalog is override the getResultListSize, w= hich then caused me to have to override paginateQuery, and then caused me t= o have to intercept the pagedQuery and then the full paging API, which is w= hat this catalog does, and I think correctly. If I don't hear any further o= bjections, I am going to commit this tomorrow. Why can't we remove the ORDER clause? SELECT COUNT(DISTINCT p.product_id) AS numResults FROM GenericFile_metadata= p since the order doesn't matter when you're just returning a count. - Ricky ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4358/#review5978 ----------------------------------------------------------- On 2012-03-14 23:40:55, Chris Mattmann wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/4358/ > ----------------------------------------------------------- > = > (Updated 2012-03-14 23:40:55) > = > = > Review request for oodt, brian Foster, Ricky Nguyen, Paul Ramirez, and Th= omas Bennett. > = > = > Summary > ------- > = > DataSourceCatalog compatible with HypersonicSQL > = > = > This addresses bug OODT-410. > https://issues.apache.org/jira/browse/OODT-410 > = > = > Diffs > ----- > = > ./trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/HsqlD= bFriendlyDataSourceCatalog.java PRE-CREATION = > ./trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/HsqlD= bFriendlyDataSourceCatalogFactory.java PRE-CREATION = > ./trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestDataSo= urceCatalog.java 1294690 = > = > Diff: https://reviews.apache.org/r/4358/diff > = > = > Testing > ------- > = > = > Thanks, > = > Chris > = > --===============8119484025302076771==--