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 967E5C92C for ; Tue, 22 May 2012 14:51:13 +0000 (UTC) Received: (qmail 74533 invoked by uid 500); 22 May 2012 14:51:13 -0000 Delivered-To: apmail-oodt-dev-archive@oodt.apache.org Received: (qmail 74101 invoked by uid 500); 22 May 2012 14:51:12 -0000 Mailing-List: contact user-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@oodt.apache.org Delivered-To: mailing list user@oodt.apache.org Received: (qmail 73927 invoked by uid 99); 22 May 2012 14:51:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2012 14:51:12 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [128.149.139.109] (HELO mail.jpl.nasa.gov) (128.149.139.109) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2012 14:51:04 +0000 Received: from mail.jpl.nasa.gov (ap-ehub-sp02.jpl.nasa.gov [128.149.137.149]) by smtp.jpl.nasa.gov (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q4MEod3G022711 (using TLSv1/SSLv3 with cipher AES128-SHA (128 bits) verified NO) for ; Tue, 22 May 2012 07:50:40 -0700 Received: from AP-EMBX-SP20.RES.AD.JPL ([169.254.8.37]) by ap-ehub-sp02.RES.AD.JPL ([fe80::dd85:7b07:1e36:7e3c%15]) with mapi id 14.02.0298.004; Tue, 22 May 2012 07:50:39 -0700 From: "Cayanan, Michael D (388J)" To: "user@oodt.apache.org" Subject: Re: Query Tool Bugs? Thread-Topic: Query Tool Bugs? Thread-Index: AQHNLutx/sA73Fkv3E2/HXYlcu2ygZbEQLCAgACB/ICAAi3vAIACkBWAgADYugCAAijDgIACTloAgAXL1ACAAVpyAA== Date: Tue, 22 May 2012 14:50:39 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.14.0.111121 x-originating-ip: [128.149.137.113] Content-Type: multipart/alternative; boundary="_000_CBE0F540F410michaelcayananjplnasagov_" MIME-Version: 1.0 X-Source-Sender: michael.d.cayanan@jpl.nasa.gov X-AUTH: Authorized --_000_CBE0F540F410michaelcayananjplnasagov_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Cecilia, The query works fine when you use either RangeBeginningDate or RangeBeginni= ngTime. It's when you do an "AND" is the issue. For your file manager, are you using mysql as the database? Or something el= se? -Mike From: "Cheng, Cecilia S (388K)" > Reply-To: > Date: Mon, 21 May 2012 18:11:14 +0000 To: "user@oodt.apache.org" > Subject: Re: Query Tool Bugs? Hi Mike / Brian, I tried running a similar query in the wengine-branch/filemgr 's query_tool= . We're using this catalog factory: filemgr.catalog.factory=3Dorg.apache.oodt.cas.filemgr.catalog.ColumnBasedDa= taSourceCatalogFactory % ./query_tool --url $FILEMGR_URL --sql -query "SELECT PRODUCTID FROM OCO2_= ECMWF WHERE AcquisitionDate>'2007-01-01' AND EndDateTime>'2010-09-24T00:00:= 00.000Z'" This works. We don't have just a time field so I can't test with a query li= ke Mike's. Mike =97 are you sure the syntax that you used (RangeBeginningTime>'12:00:0= 0Z') is valid? Maybe you want to break up your query to see whether it's fa= iling on the RangeBeginningDate or RangeBeginningTime? -- cecilia From: Brian Foster > Reply-To: "user@oodt.apache.org" > Date: Thursday, May 17, 2012 11:40 AM To: "user@oodt.apache.org" > Subject: Re: Query Tool Bugs? hey mike, would you mind trying to run this query using the wengine-branch filemgr (h= ttps://svn.apache.org/repos/asf/oodt/branches/wengine-branch/filemgr/)... t= here are a lot of bug fixes floating around in both Lucene and DataSource C= atalogs in that branch... if it works with that then we know it is a bug wi= th trunk. -brian On May 16, 2012, at 07:26 AM, "Cayanan, Michael D (388J)" > wrote: Hey Brian, Ya, I tried the query with and without the double quotes surrounding the wh= ere clause and they both didn't work for me. In any case, I've built the latest file manager in the trunk and it fixed t= hat StringIndexOutofBoundsException issue I was seeing. Thanks! Out of curiosity, I tried using the latest File Manager Client tool with th= e query with multiple conditions to see if I could get a result, but it thr= ew an exception as well: ./filemgr-client -u http://localhost:9000 -q "SELECT * FROM L0a_Radar WHERE= RangeBeginningDate>'2007-01-01' AND RangeBeginningTime>'12:00:00Z'" -op -s= qlQuery May 16, 2012 7:20:53 AM org.apache.oodt.cas.filemgr.system.XmlRpcFileManage= rClient INFO: Loading File Manager Configuration Properties from: [../etc/filemgr.p= roperties] org.apache.xmlrpc.XmlRpcException: java.lang.Exception: org.apache.oodt.cas= .filemgr.structs.exceptions.CatalogException: Failed to perform complex que= ry : You have an error in your SQL syntax; check the manual that correspond= s to your MySQL server version for the right syntax to use near 'INTERSECT = (SELECT DISTINCT product_id FROM L0a_Radar_metadata WHERE element_id =3D' a= t line 1 at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeException(XmlRpcCl= ientResponseProcessor.java:104) at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse(XmlRpcCli= entResponseProcessor.java:71) at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:73) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178) at org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.complexQuery(= XmlRpcFileManagerClient.java:990) at org.apache.oodt.cas.filemgr.cli.action.AbstractQueryCliAction.execute(Ab= stractQueryCliAction.java:75) at org.apache.oodt.cas.cli.CmdLineUtility.execute(CmdLineUtility.java:331) at org.apache.oodt.cas.cli.CmdLineUtility.run(CmdLineUtility.java:187) at org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.main(XmlRpcFi= leManagerClient.java:1323) ERROR: Failed to perform sql query : sortBy 'null', outputFormat 'null', an= d delimiter ' ', filterAlgor 'null', startDateTimeMetKey 'null', endDateTimeMetKey 'null'= , priorityMetKey 'null', null' : java.lang.Exception: org.apache.oodt.cas.f= ilemgr.structs.exceptions.CatalogException: Failed to perform complex query= : You have an error in your SQL syntax; check the manual that corresponds = to your MySQL server version for the right syntax to use near 'INTERSECT (S= ELECT DISTINCT product_id FROM L0a_Radar_metadata WHERE element_id =3D' at = line 1 Let me know if you'd like for me to file a bug for this. Thanks, Mike From: Brian Foster > Reply-To: > Date: Mon, 14 May 2012 22:28:58 +0000 To: > Subject: Re: Query Tool Bugs? hey mike, first pass over the policy files look good... however, is the way you poste= d the query the way you are running it? ./query_tool --url http://localhost:9000 --sql -que= ry "SELECT * FROM L0a_Radar WHERE "RangeBeginningDate>'2007-01-01' AND Rang= eBeginningTime>'12:00:00.000Z'"" you have an extra set of double quotes around the where clause... try remov= ing those -brian On May 14, 2012, at 09:32 AM, "Cayanan, Michael D (388J)" > wrote: Hey Chris, On 5/12/12 11:25 AM, "Mattmann, Chris A (388J)" > wrote= : >Hey Mike, > >On May 11, 2012, at 6:07 AM, Cayanan, Michael D (388J) wrote: > >>>> >>>> org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException: >>>>Failed >>>> to perform complex query : You have an error in your SQL syntax; check >>>> the manual that corresponds to your MySQL server version for the right >>>> syntax to use near 'INTERSECT (SELECT DISTINCT product_id FROM >>>> L0a_Radar_metadata WHERE element_id =3D' at line 1 >>>> at >>>> >>>>org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.complexQuery >>>>(X >>>> mlRpcFileManagerClient.java:958) >>>> at >>>> >>>>org.apache.oodt.cas.filemgr.tools.QueryTool.performSqlQuery(QueryTool.j >>>>av >>>> a:251) >>>> at >>>>org.apache.oodt.cas.filemgr.tools.QueryTool.main(QueryTool.java:241) >>> >>> Just out of curiosity, is that correct ISO 8601 date/time format? Looks >>> like a partial one, missing the timezone do you think that might >>> affect ir? >> >> I talked with Rishi regarding this and he recommended that the date and >> time be split when performing a query. Reason being is that the query >>tool >> blows up when trying to compare datetime values. He mentioned that he >> tried querying against ISO 8601 date/time values before and it didn't >>work >> for him and the way around it was to split it up. I think behind the >> scenes, the query tool is actually doing an ascii comparison, which >>might >> be why the tool might be having performance issues? > >Gotcha, that might help, yes. I was thinking: what is your repository >manager, >and catalog combination? If you are using e.g., a DataSourceCatalog, >with the XMLRepositoryManager, you'll need to turn on the quoteFields >option in the filemgr.properties for the DataSourceCatalog. This is >because, >in these scenarios, the identifier for elementIds is a string, compared >to a >number (which would be the case if you used the >DataSourceRepositoryManager -- >the short answer there is don't, it's not as well maintained as the XML >one). My repository manager and catalog combination is defined as follows in the filemgr.properties: filemgr.repository.factory=3Dorg.apache.oodt.cas.filemgr.repository.XMLRepo= si toryManagerFactory filemgr.catalog.factory=3Dorg.apache.oodt.cas.filemgr.catalog.DataSourceCat= al ogFactory org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=3Dtrue > >> >>> >>>> >>>> I tried surrounding the entire condition with quotes, but still no >>>>luck: >>>> >>>> ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM >>>> L0a_Radar WHERE "RangeBeginningDate>'2007-01-01' AND >>>> RangeBeginningTime>'12:00:00.000Z'"" >>>> Ambiguous output redirect. >>>> >>>> I'm assuming this is a syntax thing, although I don't know what the >>>> tool is expecting. >>> >>> Did you check the code in SVN? >> >> I'm running 0.3 of the code. Does the trunk fix this? I have the code >> checked out onto my local machine. I can certainly build the trunk and >>see >> if I get the same results. > >I think there is a fix for something similar to this in the trunk (as >bfoster mentioned), >but thinking about this more, I bet you're having the quoteFields >problem, per >above. Scope it out and let me know. Based on the properties specified above, the quoteFields option is turned on. So I think the properties are set correctly, no? It'll be interesting to see if Brian was able to find an error in the policy files that I sent in the previous e-mail. > >> >>> >>>> >>>> My second issue that I'm running into is in regards to querying of >>>> dates. I tried the following query below and got the following output: >>>> >>>> ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM >>>> L0a_Radar WHERE RangeBeginningDate>'2007-03-02'" >>>> log4j:WARN No appenders could be found for logger >>>> (org.apache.commons.httpclient.HttpClient). >>>> log4j:WARN Please initialize the log4j system properly. >>>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig >>>> for more info. >>>> Exception in thread "main" java.lang.StringIndexOutOfBoundsException: >>>> String index out of range: -1 >>>> at >>>> >>>>java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:88 >>>>1) >>>> at java.lang.StringBuffer.substring(StringBuffer.java:416) >>>> at >>>> >>>>org.apache.oodt.cas.filemgr.tools.QueryTool.performSqlQuery(QueryTool.j >>>>av >>>> a:255) >>>> at >>>>org.apache.oodt.cas.filemgr.tools.QueryTool.main(QueryTool.java:241) >>>> >>>> For this particular product, I have 1 product in my catalog where the >>>> RangeBeginningDate is equal to '2007-03-01'. Not sure if that factors >>>> into why an exception is being thrown here. When I use an earlier date >>>> on my query, the tool returns a result as expected: >>>> >>>> ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM >>>> L0a_Radar WHERE RangeBeginningDate>'2007-01-01'" >>>> log4j:WARN No appenders could be found for logger >>>> (org.apache.commons.httpclient.HttpClient). >>>> log4j:WARN Please initialize the log4j system properly. >>>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig >>>> for more info. >>>> >>>> >>>>/Users/mcayanan/smap/staging,2007-03-01,23:30:25.000Z,314,L0a_Radar,V20 >>>>51 >>>> >>>>7SGS0706023302501.VCD,V20517SGS0706023302501.VCD,2012-05-08T14:27:59.38 >>>>5- >>>> 07:00,L0a_Radar,23:30:25.000Z,2007-03-01 >>> >>> Interesting! Did you scope the code to see if there's a RangeQuery >>>issue? >>> >>> Feel free to file a bug and would love you to investigate! >> >> I haven't dived into the code, but will certainly do this as SMAP will >> need these capabilities. I will file a bug if it turns out that this is >> indeed a bug. > >Great Mike, thanks. > >Cheers, >Chris Thanks, Mike > >++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >Chris Mattmann, Ph.D. >Senior Computer Scientist >NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA >Office: 171-266B, Mailstop: 171-246 >Email: chris.a.mattmann@nasa.gov >WWW: http://sunset.usc.edu/~mattmann/ >++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >Adjunct Assistant Professor, Computer Science Department >University of Southern California, Los Angeles, CA 90089 USA >++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > --_000_CBE0F540F410michaelcayananjplnasagov_ Content-Type: text/html; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable
Hi Cecilia,

The query works fine when you use either RangeBeginningDate or RangeBe= ginningTime. It's when you do an "AND" is the issue.

For your file manager, are you using mysql as the database? Or somethi= ng else?

-Mike

From: "Cheng, Cecilia S (388K)= " <cecilia.s.cheng@= jpl.nasa.gov>
Reply-To: <user@oodt.apache.org>
Date: Mon, 21 May 2012 18:11:14 = 3;0000
To: "user@oodt.apache.org" <user@oodt.apache.org>
Subject: Re: Query Tool Bugs?

Hi Mike / Brian,

I tried running a similar query in the wengine-branch/filemgr 's query= _tool. We're using this catalog factory:

filemg= r.catalog.factory=3Dorg.apache.oodt.cas.filemgr.catalog.ColumnBasedDataSour= ceCatalogFactory

% ./query_tool --url $FILEMGR_URL --sql -query "SELECT PRODUCTID = FROM OCO2_ECMWF WHERE AcquisitionDate>'2007-01-01' AND EndDateTime>'2= 010-09-24T00:00:00.000Z'"

This works. We don't have just a time field so I can't test with a que= ry like Mike's. 

Mike =97 are you sure the syntax that you used (RangeBeginningTime>= '12:00:00Z') is valid? Maybe you want to break up your query to see whether= it's failing on the RangeBeginningDate or RangeBeginningTime? 

-- cecilia

From: Brian Foster <holenoter@mac.com>
Reply-To: "user@oodt.apache.org" <user@oodt.apache.org>
Date: Thursday, May 17, 2012 11:40 = AM
To: "user@oodt.apache.org" <user@oodt.apache.org>
Subject: Re: Query Tool Bugs?


hey mike,

would you mind trying to run this query using the wengine-branch filem= gr (https://svn.apache.org/repos/asf/oodt/branches/wengine-branch/f= ilemgr/)... there are a lot of bug fixes floating around in both Lucene and DataSource Catalogs in that b= ranch... if it works with that then we know it is a bug with trunk.

-brian

On May 16, 2012, at 07:26 AM, "Cayanan, Michael D (388J)" <michael.d.cayanan@jpl.nasa.g= ov> wrote:

Hey Brian,

Ya, I tried the query with and without the double quotes surrounding t= he where clause and they both didn't work for me.

In any case, I've built the latest file manager in the trunk and it fi= xed that StringIndexOutofBoundsException issue I was seeing. Thanks!

Out of curiosity, I tried using the latest File Manager Client tool wi= th the query with multiple conditions to see if I could get a result, but i= t threw an exception as well:

./filemgr-client -u http://localhost= :9000 -q "SELECT * FROM L0a_Radar WHERE RangeBeginningDate>'200= 7-01-01' AND RangeBeginningTime>'12:00:00Z'" -op -sqlQuery
May 16, 2012 7:20:53 AM org.apache.oodt.cas.filemgr.system.XmlRpcFileM= anagerClient <init>
INFO: Loading File Manager Configuration Properties from: [../etc/file= mgr.properties]
org.apache.xmlrpc.XmlRpcException: java.lang.Exception: org.apache.ood= t.cas.filemgr.structs.exceptions.CatalogException: Failed to perform comple= x query : You have an error in your SQL syntax; check the manual that corre= sponds to your MySQL server version for the right syntax to use near 'INTERSECT (SELECT DISTINCT product_id FR= OM L0a_Radar_metadata WHERE element_id =3D' at line 1
at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeException(Xml= RpcClientResponseProcessor.java:104)
at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse(XmlR= pcClientResponseProcessor.java:71)
at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.jav= a:73)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
at org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.complexQ= uery(XmlRpcFileManagerClient.java:990)
at org.apache.oodt.cas.filemgr.cli.action.AbstractQueryCliAction.execu= te(AbstractQueryCliAction.java:75)
at org.apache.oodt.cas.cli.CmdLineUtility.execute(CmdLineUtility.java:= 331)
at org.apache.oodt.cas.cli.CmdLineUtility.run(CmdLineUtility.java:187)=
at org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.main(Xml= RpcFileManagerClient.java:1323)
ERROR: Failed to perform sql query : sortBy 'null', outputFormat 'null= ', and delimiter '
', filterAlgor 'null', startDateTimeMetKey 'null', endDateTimeMetKey '= null', priorityMetKey 'null', null' : java.lang.Exception: org.apache.oodt.= cas.filemgr.structs.exceptions.CatalogException: Failed to perform complex = query : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version= for the right syntax to use near 'INTERSECT (SELECT DISTINCT product_id FR= OM L0a_Radar_metadata WHERE element_id =3D' at line 1

Let me know if you'd like for me to file a bug for this.

Thanks,
Mike

From= : Brian Foster <holenoter@mac.com>
Repl= y-To: <user@oodt.apache.org>
Date= : Mon, 14 May 2012 22:28:58 +0000
To: = <user@oodt.apache.org>
Subj= ect: Re: Query Tool Bugs?

hey mike,

first pass over the policy files look good... however, is the way you = posted the query the way you are running it?

./query_tool --url http://localhost:9000 --sql -query "= SELECT * FROM L0a_Radar WHERE "RangeBeginningDate>'2007-01-01' AND = RangeBeginningTime>'12:00:00.000Z'""

you have an extra set of double quotes around the where clause... try remov= ing those

-brian

On May 14, 2012, at 09:32 AM, "Cayanan, Michael D (388J)" <michael.d.cayanan@jpl.nasa.gov> wrote:
Hey Chris,

On 5/12/12 11:25 AM, "Mattmann, Chris A (388J)"
<chris.a.mattmann@jpl.nasa.gov> wrot= e:

>Hey Mike,
>
>On May 11, 2012, at 6:07 AM, Cayanan, Michael D (388J) wrote:
>
>>>>
>>>> org.apache.oodt.cas.filemgr.structs.exceptions.CatalogExce= ption:
>>>>Failed
>>>> to perform complex query : You have an error in your SQL s= yntax; check
>>>> the manual that corresponds to your MySQL server version f= or the right
>>>> syntax to use near 'INTERSECT (SELECT DISTINCT product_id = FROM
>>>> L0a_Radar_metadata WHERE element_id =3D' at line 1
>>>> at
>>>>
>>>>org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.= complexQuery
>>>>(X
>>>> mlRpcFileManagerClient.java:958)
>>>> at
>>>>
>>>>org.apache.oodt.cas.filemgr.tools.QueryTool.performSqlQuery= (QueryTool.j
>>>>av
>>>> a:251)
>>>> at
>>>>org.apache.oodt.cas.filemgr.tools.QueryTool.main(QueryTool.= java:241)
>>>
>>> Just out of curiosity, is that correct ISO 8601 date/time form= at? Looks
>>> like a partial one, missing the timezone do you think that mig= ht
>>> affect ir?
>>
>> I talked with Rishi regarding this and he recommended that the dat= e and
>> time be split when performing a query. Reason being is that the qu= ery
>>tool
>> blows up when trying to compare datetime values. He mentioned that= he
>> tried querying against ISO 8601 date/time values before and it did= n't
>>work
>> for him and the way around it was to split it up. I think behind t= he
>> scenes, the query tool is actually doing an ascii comparison, whic= h
>>might
>> be why the tool might be having performance issues?
>
>Gotcha, that might help, yes. I was thinking: what is your repository >manager,
>and catalog combination? If you are using e.g., a DataSourceCatalog, >with the XMLRepositoryManager, you'll need to turn on the quoteFields >option in the filemgr.properties for the DataSourceCatalog. This is
>because,
>in these scenarios, the identifier for elementIds is a string, compared=
>to a
>number (which would be the case if you used the
>DataSourceRepositoryManager --
>the short answer there is don't, it's not as well maintained as the XML=
>one).

My repository manager and catalog combination is defined as follows in the<= br> filemgr.properties:

filemgr.repository.factory=3Dorg.apache.oodt.cas.filemgr.repository.XMLRepo= si
toryManagerFactory

filemgr.catalog.factory=3Dorg.apache.oodt.cas.filemgr.catalog.DataSourceCat= al
ogFactory

org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=3Dtrue



>
>>
>>>
>>>>
>>>> I tried surrounding the entire condition with quotes, but = still no
>>>>luck:
>>>>
>>>> ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM
>>>> L0a_Radar WHERE "RangeBeginningDate>'2007-01-01' A= ND
>>>> RangeBeginningTime>'12:00:00.000Z'""
>>>> Ambiguous output redirect.
>>>>
>>>> I'm assuming this is a syntax thing, although I don't know= what the
>>>> tool is expecting.
>>>
>>> Did you check the code in SVN?
>>
>> I'm running 0.3 of the code. Does the trunk fix this? I have the c= ode
>> checked out onto my local machine. I can certainly build the trunk= and
>>see
>> if I get the same results.
>
>I think there is a fix for something similar to this in the trunk (as >bfoster mentioned),
>but thinking about this more, I bet you're having the quoteFields
>problem, per
>above. Scope it out and let me know.

Based on the properties specified above, the quoteFields option is turned on. So I think the properties are set correctly, no?
It'll be interesting to see if Brian was able to find an error in the
policy files that I sent in the previous e-mail.

>
>>
>>>
>>>>
>>>> My second issue that I'm running into is in regards to que= rying of
>>>> dates. I tried the following query below and got the follo= wing output:
>>>>
>>>> ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM
>>>> L0a_Radar WHERE RangeBeginningDate>'2007-03-02'" >>>> log4j:WARN No appenders could be found for logger
>>>> (org.apache.commons.httpclient.HttpClient).
>>>> log4j:WARN Please initialize the log4j system properly. >>>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
>>>> for more info.
>>>> Exception in thread "main" java.lang.StringIndex= OutOfBoundsException:
>>>> String index out of range: -1
>>>> at
>>>>
>>>>java.lang.AbstractStringBuilder.substring(AbstractStringBui= lder.java:88
>>>>1)
>>>> at java.lang.StringBuffer.substring(StringBuffer.java:416)=
>>>> at
>>>>
>>>>org.apache.oodt.cas.filemgr.tools.QueryTool.performSqlQuery= (QueryTool.j
>>>>av
>>>> a:255)
>>>> at
>>>>org.apache.oodt.cas.filemgr.tools.QueryTool.main(QueryTool.= java:241)
>>>>
>>>> For this particular product, I have 1 product in my catalo= g where the
>>>> RangeBeginningDate is equal to '2007-03-01'. Not sure if t= hat factors
>>>> into why an exception is being thrown here. When I use an = earlier date
>>>> on my query, the tool returns a result as expected:
>>>>
>>>> ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM
>>>> L0a_Radar WHERE RangeBeginningDate>'2007-01-01'" >>>> log4j:WARN No appenders could be found for logger
>>>> (org.apache.commons.httpclient.HttpClient).
>>>> log4j:WARN Please initialize the log4j system properly. >>>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
>>>> for more info.
>>>>
>>>>
>>>>/Users/mcayanan/smap/staging,2007-03-01,23:30:25.000Z,314,L= 0a_Radar,V20
>>>>51
>>>>
>>>>7SGS0706023302501.VCD,V20517SGS0706023302501.VCD,2012-05-08= T14:27:59.38
>>>>5-
>>>> 07:00,L0a_Radar,23:30:25.000Z,2007-03-01
>>>
>>> Interesting! Did you scope the code to see if there's a RangeQ= uery
>>>issue?
>>>
>>> Feel free to file a bug and would love you to investigate!
>>
>> I haven't dived into the code, but will certainly do this as SMAP = will
>> need these capabilities. I will file a bug if it turns out that th= is is
>> indeed a bug.
>
>Great Mike, thanks.
>
>Cheers,
>Chris

Thanks,
Mike

>
>++++++++++++++&= #43;++++++++++++++&= #43;++++++++++++++&= #43;++++++++++++++&= #43;++++++
>Chris Mattmann, Ph.D.
>Senior Computer Scientist
>NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
>Office: 171-266B, Mailstop: 171-246
>Email: chris.a.mattmann@nasa.gov
>WWW: http://sunset.usc.edu/~mattmann/
>++++++++++++++&= #43;++++++++++++++&= #43;++++++++++++++&= #43;++++++++++++++&= #43;++++++
>Adjunct Assistant Professor, Computer Science Department
>University of Southern California, Los Angeles, CA 90089 USA
>++++++++++++++&= #43;++++++++++++++&= #43;++++++++++++++&= #43;++++++++++++++&= #43;++++++
>

--_000_CBE0F540F410michaelcayananjplnasagov_--