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

[jira] [Created] (OODT-333) XMLPS query doesn't quote literal string

XMLPS query doesn't quote literal string
----------------------------------------

                 Key: OODT-333
                 URL: https://issues.apache.org/jira/browse/OODT-333
             Project: OODT
          Issue Type: Bug
          Components: xmlps
    Affects Versions: 0.4
            Reporter: Ricky Nguyen
            Priority: Minor
             Fix For: 0.4


As reported by sheryljj:

(1) XMLQuery without parentheses:
RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'

Generates the following SQL query:
SELECT ... WHERE (baz = yes AND baz = 'no')

If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.


(2) XMLQuery with parentheses:
RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')

Generates the following SQL query:
SELECT ... WHERE (baz = yes OR baz = 'no')

The expected SQL query is:
SELECT ... WHERE (baz = 'yes' OR baz = 'no')


--
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-333) XMLPS query doesn't quote literal string

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

Sheryl John commented on OODT-333:
----------------------------------

I'm sorry. I didn't know that the parser accepts the RETURNs at the end too. I haven't tried it yet. But if the format doesn't matter to the parser, I guess the only thing to be fixed is whats described in this issue.
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Priority: Minor
>             Fix For: 0.4
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Chris A. Mattmann commented on OODT-333:
----------------------------------------

Quick review of patch:

* contains a bunch of superfluous whitespace changes
* the commented out examples can probably be simply included on this issue in the comments
* changes to the generics don't look like they belong in this patch and are superfluous
* looks like the main change is to call parse with the map -- is that right?


                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Sheryl John commented on OODT-333:
----------------------------------

I would prefer to stick with the initial format. This is because from an SQL perspective, the WHERE clause would follow a SELECT clause and so, will confuse DIS-style user if the second format is introduced. 
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Priority: Minor
>             Fix For: 0.4
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> Generates the following SQL query:
> SELECT ... WHERE (baz = yes AND baz = 'no')
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> Generates the following SQL query:
> SELECT ... WHERE (baz = yes OR baz = 'no')
> The expected SQL query is:
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')

--
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-333) XMLPS query doesn't quote literal string

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

Chris A. Mattmann commented on OODT-333:
----------------------------------------

Hi Ricky, sure, you can check this out:

https://cwiki.apache.org/OODT/oodt-eclipse-developer-help.html

                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Ricky Nguyen updated OODT-333:
------------------------------

    Description: 
As reported by sheryljj:

(1) XMLQuery without parentheses:
{code}
RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
{code}

Generates the following SQL query:
{code}
SELECT ... WHERE (baz = yes AND baz = 'no')
{code}

If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.


(2) XMLQuery with parentheses:
{code}
RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
{code}

Generates the following SQL query:
{code}
SELECT ... WHERE (baz = yes OR baz = 'no')
{code}

The expected SQL query is:
{code}
SELECT ... WHERE (baz = 'yes' OR baz = 'no')
{code}


  was:
As reported by sheryljj:

(1) XMLQuery without parentheses:
RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'

Generates the following SQL query:
SELECT ... WHERE (baz = yes AND baz = 'no')

If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.


(2) XMLQuery with parentheses:
RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')

Generates the following SQL query:
SELECT ... WHERE (baz = yes OR baz = 'no')

The expected SQL query is:
SELECT ... WHERE (baz = 'yes' OR baz = 'no')


    
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Priority: Minor
>             Fix For: 0.4
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Ricky Nguyen commented on OODT-333:
-----------------------------------

cool i'll remember that for next time. btw, is there some eclipse code style for OODT i can import? (assuming eclipse is your de facto IDE.)
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Chris A. Mattmann commented on OODT-333:
----------------------------------------

bq. They are included in OODT-334.

Perfect, keeping them there is fine then and we can remove commented code from the patch.

bq. Why not prettify the code while we fix the bugs?

Because philosophically, patches should contain the minimum required change (the minimum revertible change) so that it's easier to track what's actually being fixed. Patches that conflate multiple goals in a single patch are harder to revert, harder to track what's introduced, and ultimately confuse the notion of version control, and revisions.

I always encourage devs to create, small independent patches. Those are the easiest to review, commit, and get into the source tree.


                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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] [Issue Comment Edited] (OODT-333) XMLPS query doesn't quote literal string

Posted by "Ricky Nguyen (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126798#comment-13126798 ] 

Ricky Nguyen edited comment on OODT-333 at 10/13/11 6:42 PM:
-------------------------------------------------------------

Even if the query is reordered as Chris suggested, the literal is still not quoted.

Perhaps the ordering of RETURN triples should be filed as a separate issue.
                
      was (Author: rickdn):
    Even the query is reordered as Chris suggested, the literal is still not quoted.

Perhaps the ordering of RETURN triples should be filed as a separate issue.
                  
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Priority: Minor
>             Fix For: 0.4
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Chris A. Mattmann commented on OODT-333:
----------------------------------------

Guys, does it matter if you reformulate:

{noformat}
RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
{noformat}

as

{noformat}
baz = 'yes' OR baz = 'no' AND RETURN = foo AND RETURN = bar 
{noformat}

?
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Priority: Minor
>             Fix For: 0.4
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> Generates the following SQL query:
> SELECT ... WHERE (baz = yes AND baz = 'no')
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> Generates the following SQL query:
> SELECT ... WHERE (baz = yes OR baz = 'no')
> The expected SQL query is:
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')

--
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-333) XMLPS query doesn't quote literal string

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

Chris A. Mattmann commented on OODT-333:
----------------------------------------

I'll take a look at the patch. Note:

bq. I would prefer to stick with the initial format. This is because from an SQL perspective, the WHERE clause would follow a SELECT clause and so, will confuse DIS-style user if the second format is introduced. 

DIS != SQL :) It's fine if they aren't the same and queries don't look similar.

bq. Even if the query is reordered as Chris suggested, the literal is still not quoted.

So it sounds like my suggestion addressed at least the parsing issue, just not the quoting. I'll take a look at the patch for quoting.

Thanks guys!

                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Ricky Nguyen updated OODT-333:
------------------------------

    Attachment: rickdn-oodt-333.patch

This patch only fixes the literal quoting issue.  The XMLQuery's (1) and (2) MUST be written as:
{code}
(baz = 'yes' OR baz = 'no') AND RETURN = foo AND RETURN = bar
{code}

The ordering of RETURN triples, and the use of grouping parentheses, should be filed as a separate issue.

- Applies mapping to left-hand side of OR and AND operations (previously no mapping used)

- unit test added
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Chris A. Mattmann commented on OODT-333:
----------------------------------------

Ricky, thanks dude! Looks good. Going to commit it now!
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333-clean.patch, rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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] [Assigned] (OODT-333) XMLPS query doesn't quote literal string

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

Chris A. Mattmann reassigned OODT-333:
--------------------------------------

    Assignee: Chris A. Mattmann
    
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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] [Issue Comment Edited] (OODT-333) XMLPS query doesn't quote literal string

Posted by "Ricky Nguyen (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126840#comment-13126840 ] 

Ricky Nguyen edited comment on OODT-333 at 10/13/11 9:15 PM:
-------------------------------------------------------------

The ordering of RETURN triples is filed as OODT-334

This patch only fixes the literal quoting issue.  The XMLQuery's (1) and (2) MUST be written as:
{code}
(baz = 'yes' OR baz = 'no') AND RETURN = foo AND RETURN = bar
{code}

- Applies mapping to left-hand side of OR and AND operations (previously no mapping used)

- unit test added
                
      was (Author: rickdn):
    This patch only fixes the literal quoting issue.  The XMLQuery's (1) and (2) MUST be written as:
{code}
(baz = 'yes' OR baz = 'no') AND RETURN = foo AND RETURN = bar
{code}

The ordering of RETURN triples, and the use of grouping parentheses, should be filed as a separate issue.

- Applies mapping to left-hand side of OR and AND operations (previously no mapping used)

- unit test added
                  
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Ricky Nguyen updated OODT-333:
------------------------------

    Attachment: rickdn-oodt-333-clean.patch

cleaner version of previous submission. no longer includes:
* whitespace removal
* unnecessary cast removal
* reorganized imports
* commented test cases (these are recorded in OODT-334)
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333-clean.patch, rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Ricky Nguyen commented on OODT-333:
-----------------------------------

Even the query is reordered as Chris suggested, the literal is still not quoted.

Perhaps the ordering of RETURN triples should be filed as a separate issue.
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Priority: Minor
>             Fix For: 0.4
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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] [Resolved] (OODT-333) XMLPS query doesn't quote literal string

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

Chris A. Mattmann resolved OODT-333.
------------------------------------

    Resolution: Fixed

- applied Ricky's clean patch in r1185462. Nice job, Ricky! Way to work the process.
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333-clean.patch, rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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-333) XMLPS query doesn't quote literal string

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

Ricky Nguyen commented on OODT-333:
-----------------------------------

bq. the commented out examples can probably be simply included on this issue in the comments

They are included in OODT-334.

bq. looks like the main change is to call parse with the map – is that right?

Yes, this is the main change

bq. contains a bunch of superfluous whitespace changes
bq. changes to the generics don't look like they belong in this patch and are superfluous

Why not prettify the code while we fix the bugs?
                
> XMLPS query doesn't quote literal string
> ----------------------------------------
>
>                 Key: OODT-333
>                 URL: https://issues.apache.org/jira/browse/OODT-333
>             Project: OODT
>          Issue Type: Bug
>          Components: xmlps
>    Affects Versions: 0.4
>            Reporter: Ricky Nguyen
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: rickdn-oodt-333.patch
>
>
> As reported by sheryljj:
> (1) XMLQuery without parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND baz = 'yes' OR baz = 'no'
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes AND baz = 'no')
> {code}
> If AND has precedence, it is unclear what it means to "AND" "baz='yes'" with the RETURN values on the left.
> If we assume that RETURN values are ignored, then (1) should be equivalent with (2) below.
> (2) XMLQuery with parentheses:
> {code}
> RETURN = foo AND RETURN = bar AND (baz = 'yes' OR baz = 'no')
> {code}
> Generates the following SQL query:
> {code}
> SELECT ... WHERE (baz = yes OR baz = 'no')
> {code}
> The expected SQL query is:
> {code}
> SELECT ... WHERE (baz = 'yes' OR baz = 'no')
> {code}

--
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