You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Joel Richard (JIRA)" <ji...@apache.org> on 2012/11/22 13:12:58 UTC
[jira] [Created] (JCR-3461) SQL2 query returns no results because @
in path is ignored
Joel Richard created JCR-3461:
---------------------------------
Summary: SQL2 query returns no results because @ in path is ignored
Key: JCR-3461
URL: https://issues.apache.org/jira/browse/JCR-3461
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-jcr-commons
Affects Versions: 2.5
Reporter: Joel Richard
Priority: Minor
If you search for nodes under a given path with ISDESCENDANTNODE and the path contains an @, no results are returned because the @ is removed from the path and then the path cannot be found.
The @ gets lost in the org.apache.jackrabbit.commons.query.sql2.Parser#readName method. The reason is that the initialize method assigns the wrong type for @.
Probably the problem exists for other special characters as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JCR-3461) SQL2 query returns no results because
@ in path is ignored
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502781#comment-13502781 ]
Thomas Mueller commented on JCR-3461:
-------------------------------------
I didn't test it yet myself, but I guess the problem is that the parser currently tries to parse whatever is inside "[" and "]" in a special way. In my view, the JCR 2.0 specification is not very clear about this, and I also ran into this problem for Oak: https://issues.apache.org/jira/browse/OAK-295
I filed an issue for the next version of the JCR API: http://java.net/jira/browse/JSR_333-53
I guess it would be possible to build a workaround for Jackrabbit 2.x, at least some of the special characters. However I'm not sure if we should rather fix all problems by changing the parser in the same way as I did for Oak (see OAK-295). The problem is this would make Jackrabbit behave a bit differently for some (rather strange) queries. For example, currently ISDESCENDANTNODE(['/content/test@test']) should work, while it would no longer work once the parser is changed.
> SQL2 query returns no results because @ in path is ignored
> ----------------------------------------------------------
>
> Key: JCR-3461
> URL: https://issues.apache.org/jira/browse/JCR-3461
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jcr-commons
> Affects Versions: 2.5
> Reporter: Joel Richard
> Priority: Minor
> Labels: queryparser, sql2
>
> If you search for nodes under a given path with ISDESCENDANTNODE and the path contains an @, no results are returned because the @ is removed from the path and then the path cannot be found.
> The @ gets lost in the org.apache.jackrabbit.commons.query.sql2.Parser#readName method. The reason is that the initialize method assigns the wrong type for @.
> Probably the problem exists for other special characters as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JCR-3461) SQL2 query returns no results because
@ in path is ignored
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502753#comment-13502753 ]
Thomas Mueller commented on JCR-3461:
-------------------------------------
Could you provide an example query please?
> SQL2 query returns no results because @ in path is ignored
> ----------------------------------------------------------
>
> Key: JCR-3461
> URL: https://issues.apache.org/jira/browse/JCR-3461
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jcr-commons
> Affects Versions: 2.5
> Reporter: Joel Richard
> Priority: Minor
> Labels: queryparser, sql2
>
> If you search for nodes under a given path with ISDESCENDANTNODE and the path contains an @, no results are returned because the @ is removed from the path and then the path cannot be found.
> The @ gets lost in the org.apache.jackrabbit.commons.query.sql2.Parser#readName method. The reason is that the initialize method assigns the wrong type for @.
> Probably the problem exists for other special characters as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (JCR-3461) SQL2 query returns no results
because @ in path is ignored
Posted by "Joel Richard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502757#comment-13502757 ]
Joel Richard edited comment on JCR-3461 at 11/22/12 1:04 PM:
-------------------------------------------------------------
Here an example query (the node "/content/test@test" exists and has child nodes):
SELECT * FROM [nt:base] AS node WHERE ISDESCENDANTNODE([/content/test@test])
was (Author: joelrich):
Here an example query:
SELECT * FROM [nt:base] AS node WHERE ISDESCENDANTNODE([/content/test@test])
> SQL2 query returns no results because @ in path is ignored
> ----------------------------------------------------------
>
> Key: JCR-3461
> URL: https://issues.apache.org/jira/browse/JCR-3461
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jcr-commons
> Affects Versions: 2.5
> Reporter: Joel Richard
> Priority: Minor
> Labels: queryparser, sql2
>
> If you search for nodes under a given path with ISDESCENDANTNODE and the path contains an @, no results are returned because the @ is removed from the path and then the path cannot be found.
> The @ gets lost in the org.apache.jackrabbit.commons.query.sql2.Parser#readName method. The reason is that the initialize method assigns the wrong type for @.
> Probably the problem exists for other special characters as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JCR-3461) SQL2 query returns no results because
@ in path is ignored
Posted by "Joel Richard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502757#comment-13502757 ]
Joel Richard commented on JCR-3461:
-----------------------------------
Here an example query:
SELECT * FROM [nt:base] AS node WHERE ISDESCENDANTNODE([/content/test@test])
> SQL2 query returns no results because @ in path is ignored
> ----------------------------------------------------------
>
> Key: JCR-3461
> URL: https://issues.apache.org/jira/browse/JCR-3461
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jcr-commons
> Affects Versions: 2.5
> Reporter: Joel Richard
> Priority: Minor
> Labels: queryparser, sql2
>
> If you search for nodes under a given path with ISDESCENDANTNODE and the path contains an @, no results are returned because the @ is removed from the path and then the path cannot be found.
> The @ gets lost in the org.apache.jackrabbit.commons.query.sql2.Parser#readName method. The reason is that the initialize method assigns the wrong type for @.
> Probably the problem exists for other special characters as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira