You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Thomas Bennett (Created) (JIRA)" <ji...@apache.org> on 2011/10/04 15:17:38 UTC

[jira] [Created] (OODT-325) QueryTool does not retain query order

QueryTool does not retain query order
-------------------------------------

                 Key: OODT-325
                 URL: https://issues.apache.org/jira/browse/OODT-325
             Project: OODT
          Issue Type: Improvement
          Components: file manager
    Affects Versions: 0.3
         Environment: OS X 10.7
Java version "1.6.0_26"
            Reporter: Thomas Bennett
            Priority: Minor
             Fix For: 0.4


I've ingested some files into a lucene catalog and then use QueryTool query the catalog.

$ ./query_tool --url http://localhost:9000 --sql -query "SELECT Observer,Description,Duration,ExperimentID FROM KatFile WHERE Observer='jasper'" --sortBy Duration
Which returns:
...
jasper,a9909ae6-822b-11e0-a7a1-0060dd4721d8,Target track,637.841571569
jasper,47c3a4da-822a-11e0-a7a1-0060dd4721d8,Target track,565.859450817
jasper,777b0f34-8224-11e0-a7a1-0060dd4721d8,Target track,80.9798858166
...

As you can see the order of the returned values seems to be arbitrary (I asked Observer,Description,Duration,ExperimentID and it ruturned Observer,ExperimentID,Description,Duration)


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (OODT-325) QueryTool does not retain query order

Posted by Thomas Bennett <tb...@ska.ac.za>.
Hi Brian,

Thanks for the post and your input. I'll add this very useful bit
information to the File Manager User Guide on cwiki. I had no idea what
outputFormat did :).

I'm also just making a note of this - at some point some better command line
operator checking that is needed. I see I erroneously added a second - to
sortBy. sortBy and outputFormat specify a single operator identifier (i.e.
-)

The command executes with two -- for sortBy and outputFormat but produces an
erroneous result.

For completeness, the correct command is:

./query_tool --url http://localhost:9000 --sql -query "SELECT
Observer,Description,Duration,ExperimentID FROM KatFile WHERE
Observer='jasper'" -sortBy Duration -outputFormat
'$Observer,$Description,$Duration,$ExperimentID'

Kind regards,
Thomas

On 4 October 2011 16:56, Brian Foster (Commented) (JIRA) <ji...@apache.org>wrote:

>
>    [
> https://issues.apache.org/jira/browse/OODT-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120183#comment-13120183]
>
> Brian Foster commented on OODT-325:
> -----------------------------------
>
> the other possibility is the in QueryTool you could make the default value
> of the outputFormat to the SELECT clause and just put $ in front of each
> element... until this is codified the workaround for this issue is to just
> fill out outputFormat manually for each query... for example your query
> above would become:
>
> ./query_tool --url http://localhost:9000 --sql -query "SELECT
> Observer,Description,Duration,ExperimentID FROM KatFile WHERE
> Observer='jasper'" --sortBy Duration --outputFormat
> '$Observer,$Description,$Duration,$ExperimentID'
>
> > QueryTool does not retain query order
> > -------------------------------------
> >
> >                 Key: OODT-325
> >                 URL: https://issues.apache.org/jira/browse/OODT-325
> >             Project: OODT
> >          Issue Type: Improvement
> >          Components: file manager
> >    Affects Versions: 0.3
> >         Environment: OS X 10.7
> > Java version "1.6.0_26"
> >            Reporter: Thomas Bennett
> >            Priority: Minor
> >              Labels: features, newbie
> >             Fix For: 0.4
> >
> >
> > I've ingested some files into a lucene catalog and then use QueryTool
> query the catalog.
> > $ ./query_tool --url http://localhost:9000 --sql -query "SELECT
> Observer,Description,Duration,ExperimentID FROM KatFile WHERE
> Observer='jasper'" --sortBy Duration
> > Which returns:
> > ...
> > jasper,a9909ae6-822b-11e0-a7a1-0060dd4721d8,Target track,637.841571569
> > jasper,47c3a4da-822a-11e0-a7a1-0060dd4721d8,Target track,565.859450817
> > jasper,777b0f34-8224-11e0-a7a1-0060dd4721d8,Target track,80.9798858166
> > ...
> > As you can see the order of the returned values seems to be arbitrary (I
> asked Observer,Description,Duration,ExperimentID and it ruturned
> Observer,ExperimentID,Description,Duration)
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>


-- 
Thomas Bennett

SKA South Africa

Office :  +2721 506 7341
Mobile : +2779 523 7105
Email  :  tbennett@ska.ac.za

[jira] [Updated] (OODT-325) QueryTool does not retain query order

Posted by "Chris A. Mattmann (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann updated OODT-325:
-----------------------------------

    Fix Version/s:     (was: 0.4)
                   0.5

- push to 0.5
                
> QueryTool does not retain query order
> -------------------------------------
>
>                 Key: OODT-325
>                 URL: https://issues.apache.org/jira/browse/OODT-325
>             Project: OODT
>          Issue Type: Improvement
>          Components: file manager
>    Affects Versions: 0.3
>         Environment: OS X 10.7
> Java version "1.6.0_26"
>            Reporter: Thomas Bennett
>            Priority: Minor
>              Labels: features, newbie
>             Fix For: 0.5
>
>
> I've ingested some files into a lucene catalog and then use QueryTool query the catalog.
> $ ./query_tool --url http://localhost:9000 --sql -query "SELECT Observer,Description,Duration,ExperimentID FROM KatFile WHERE Observer='jasper'" --sortBy Duration
> Which returns:
> ...
> jasper,a9909ae6-822b-11e0-a7a1-0060dd4721d8,Target track,637.841571569
> jasper,47c3a4da-822a-11e0-a7a1-0060dd4721d8,Target track,565.859450817
> jasper,777b0f34-8224-11e0-a7a1-0060dd4721d8,Target track,80.9798858166
> ...
> As you can see the order of the returned values seems to be arbitrary (I asked Observer,Description,Duration,ExperimentID and it ruturned Observer,ExperimentID,Description,Duration)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OODT-325) QueryTool does not retain query order

Posted by "Chris A. Mattmann (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann updated OODT-325:
-----------------------------------


- push out to 0.5
                
> QueryTool does not retain query order
> -------------------------------------
>
>                 Key: OODT-325
>                 URL: https://issues.apache.org/jira/browse/OODT-325
>             Project: OODT
>          Issue Type: Improvement
>          Components: file manager
>    Affects Versions: 0.3
>         Environment: OS X 10.7
> Java version "1.6.0_26"
>            Reporter: Thomas Bennett
>            Priority: Minor
>              Labels: features, newbie
>             Fix For: 0.5
>
>
> I've ingested some files into a lucene catalog and then use QueryTool query the catalog.
> $ ./query_tool --url http://localhost:9000 --sql -query "SELECT Observer,Description,Duration,ExperimentID FROM KatFile WHERE Observer='jasper'" --sortBy Duration
> Which returns:
> ...
> jasper,a9909ae6-822b-11e0-a7a1-0060dd4721d8,Target track,637.841571569
> jasper,47c3a4da-822a-11e0-a7a1-0060dd4721d8,Target track,565.859450817
> jasper,777b0f34-8224-11e0-a7a1-0060dd4721d8,Target track,80.9798858166
> ...
> As you can see the order of the returned values seems to be arbitrary (I asked Observer,Description,Duration,ExperimentID and it ruturned Observer,ExperimentID,Description,Duration)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-325) QueryTool does not retain query order

Posted by "Brian Foster (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120183#comment-13120183 ] 

Brian Foster commented on OODT-325:
-----------------------------------

the other possibility is the in QueryTool you could make the default value of the outputFormat to the SELECT clause and just put $ in front of each element... until this is codified the workaround for this issue is to just fill out outputFormat manually for each query... for example your query above would become:

./query_tool --url http://localhost:9000 --sql -query "SELECT Observer,Description,Duration,ExperimentID FROM KatFile WHERE Observer='jasper'" --sortBy Duration --outputFormat '$Observer,$Description,$Duration,$ExperimentID'
                
> QueryTool does not retain query order
> -------------------------------------
>
>                 Key: OODT-325
>                 URL: https://issues.apache.org/jira/browse/OODT-325
>             Project: OODT
>          Issue Type: Improvement
>          Components: file manager
>    Affects Versions: 0.3
>         Environment: OS X 10.7
> Java version "1.6.0_26"
>            Reporter: Thomas Bennett
>            Priority: Minor
>              Labels: features, newbie
>             Fix For: 0.4
>
>
> I've ingested some files into a lucene catalog and then use QueryTool query the catalog.
> $ ./query_tool --url http://localhost:9000 --sql -query "SELECT Observer,Description,Duration,ExperimentID FROM KatFile WHERE Observer='jasper'" --sortBy Duration
> Which returns:
> ...
> jasper,a9909ae6-822b-11e0-a7a1-0060dd4721d8,Target track,637.841571569
> jasper,47c3a4da-822a-11e0-a7a1-0060dd4721d8,Target track,565.859450817
> jasper,777b0f34-8224-11e0-a7a1-0060dd4721d8,Target track,80.9798858166
> ...
> As you can see the order of the returned values seems to be arbitrary (I asked Observer,Description,Duration,ExperimentID and it ruturned Observer,ExperimentID,Description,Duration)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-325) QueryTool does not retain query order

Posted by "Thomas Bennett (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120100#comment-13120100 ] 

Thomas Bennett commented on OODT-325:
-------------------------------------

My thoughts on a possible solution:

XMLRpcFileManagerClient has a method called complexQuery.
This method has a variable called queryResultHashVector -> a vector of hash tables. 
This vector contains the query results.
The return value to the calling class is created by calling XmlRpcStructFactory.getQueryResultsFromXmlRpc().

XmlRpcStructFactory.getQueryResultsFromXmlRpc() is where all the action happens!

XmlRpcStructFactory.getQueryResultsFromXmlRpc() returns a list strings.

If XmlRpcStructFactory.getQueryResultsFromXmlRpc was passed complexQuery.reducedMetadata as a parameter, it could figure out how to return the values in the requested order.


                
> QueryTool does not retain query order
> -------------------------------------
>
>                 Key: OODT-325
>                 URL: https://issues.apache.org/jira/browse/OODT-325
>             Project: OODT
>          Issue Type: Improvement
>          Components: file manager
>    Affects Versions: 0.3
>         Environment: OS X 10.7
> Java version "1.6.0_26"
>            Reporter: Thomas Bennett
>            Priority: Minor
>              Labels: features, newbie
>             Fix For: 0.4
>
>
> I've ingested some files into a lucene catalog and then use QueryTool query the catalog.
> $ ./query_tool --url http://localhost:9000 --sql -query "SELECT Observer,Description,Duration,ExperimentID FROM KatFile WHERE Observer='jasper'" --sortBy Duration
> Which returns:
> ...
> jasper,a9909ae6-822b-11e0-a7a1-0060dd4721d8,Target track,637.841571569
> jasper,47c3a4da-822a-11e0-a7a1-0060dd4721d8,Target track,565.859450817
> jasper,777b0f34-8224-11e0-a7a1-0060dd4721d8,Target track,80.9798858166
> ...
> As you can see the order of the returned values seems to be arbitrary (I asked Observer,Description,Duration,ExperimentID and it ruturned Observer,ExperimentID,Description,Duration)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira