You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2013/09/26 18:08:03 UTC

[jira] [Commented] (OAK-874) Column names aren't reported properly for "select * from [nodeType]" queries

    [ https://issues.apache.org/jira/browse/OAK-874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13778936#comment-13778936 ] 

Jukka Zitting commented on OAK-874:
-----------------------------------

It looks like the test is failing because the wildcard columns of the query {{select * from [test:RTypeTest]}} are returned as {{prop1, prop2, jcr:primaryType}} instead of {{test:RTypeTest.prop1, test:RTypeTest.prop2, test:RTypeTest.jcr:primaryType}}. Both responses seem valid to me.

The reason for the current behavior is in {{SQL2Parser.addWildcardColumns()}} where the types of unnamed selectors are added to wildcard columns only if there are more than one selector (i.e. {{selectors.size() > 1}}). The idea behind that is to avoid extra verbosity when the column names already are unique. The spec leaves the topic open, only saying that, for the SQL2 syntax, "if only one selector exists in this query, explicit specification of the selectorName preceding the propertyName is optional" (6.7.39 Column).

I guess we could either change the {{addWildcardColumns()}} method to always include the selector names for maximum compatibility with Jackrabbit 2.x, or relax the {{SQL2QueryResultTest}} expectations so that both kinds of return values are allowed.
                
> Column names aren't reported properly for "select * from [nodeType]" queries
> ----------------------------------------------------------------------------
>
>                 Key: OAK-874
>                 URL: https://issues.apache.org/jira/browse/OAK-874
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: core, query
>    Affects Versions: 0.8
>            Reporter: Alex Parvulescu
>
> This is basically the same as OAK-323, except that one is now closed and I can't reopen it.
> The test _org.apache.jackrabbit.core.query.SQL2QueryResultTest#testSQL2SelectColums_ is now failing again.

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