You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Nick Tuckett (Created) (JIRA)" <ji...@apache.org> on 2012/03/21 15:07:40 UTC
[jira] [Created] (JCR-3266) JCR-SQL2 query with multiple columns in
result only returns last column when using Row.getValues()
JCR-SQL2 query with multiple columns in result only returns last column when using Row.getValues()
--------------------------------------------------------------------------------------------------
Key: JCR-3266
URL: https://issues.apache.org/jira/browse/JCR-3266
Project: Jackrabbit Content Repository
Issue Type: Bug
Affects Versions: 2.4, 2.2.4
Reporter: Nick Tuckett
When running a query like below on an in-process repository (via TransientRepository) or via RMI access, a call to Row.getValues() only returns the last column selected:
SELECT property1, property2 FROM [nodetype]
QueryResult.getColumnNames() returns the right set of columns.
Stepping through the code shows that org.apache.jackrabbit.core.query.lucene.join.AbstractRow has the implementation of getValues() - this creates a new Values array, then overwrites it multiple times in a for loop that iterates once per column. That doesn't sound like the desired behaviour.
Getting values via individual calls to Row.getValue("property1") gives the correct results.
--
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] (JCR-3266) JCR-SQL2 query with multiple columns in
result only returns last column when using Row.getValues()
Posted by "Julian Reschke (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Reschke updated JCR-3266:
--------------------------------
Fix Version/s: 2.4.1
2.2.12
Assignee: Julian Reschke
> JCR-SQL2 query with multiple columns in result only returns last column when using Row.getValues()
> --------------------------------------------------------------------------------------------------
>
> Key: JCR-3266
> URL: https://issues.apache.org/jira/browse/JCR-3266
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Affects Versions: 2.2.4, 2.4
> Reporter: Nick Tuckett
> Assignee: Julian Reschke
> Fix For: 2.2.12, 2.4.1, 2.6
>
>
> When running a query like below on an in-process repository (via TransientRepository) or via RMI access, a call to Row.getValues() only returns the last column selected:
> SELECT property1, property2 FROM [nodetype]
> QueryResult.getColumnNames() returns the right set of columns.
> Stepping through the code shows that org.apache.jackrabbit.core.query.lucene.join.AbstractRow has the implementation of getValues() - this creates a new Values array, then overwrites it multiple times in a for loop that iterates once per column. That doesn't sound like the desired behaviour.
> Getting values via individual calls to Row.getValue("property1") gives the correct results.
--
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] (JCR-3266) JCR-SQL2 query with multiple columns
in result only returns last column when using Row.getValues()
Posted by "Alex Parvulescu (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Parvulescu resolved JCR-3266.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.6
good catch, thanks for reporting Nick!
I've also improved an existing test to check this info as well.
Fixed in revision 1303438.
> JCR-SQL2 query with multiple columns in result only returns last column when using Row.getValues()
> --------------------------------------------------------------------------------------------------
>
> Key: JCR-3266
> URL: https://issues.apache.org/jira/browse/JCR-3266
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Affects Versions: 2.2.4, 2.4
> Reporter: Nick Tuckett
> Fix For: 2.6
>
>
> When running a query like below on an in-process repository (via TransientRepository) or via RMI access, a call to Row.getValues() only returns the last column selected:
> SELECT property1, property2 FROM [nodetype]
> QueryResult.getColumnNames() returns the right set of columns.
> Stepping through the code shows that org.apache.jackrabbit.core.query.lucene.join.AbstractRow has the implementation of getValues() - this creates a new Values array, then overwrites it multiple times in a for loop that iterates once per column. That doesn't sound like the desired behaviour.
> Getting values via individual calls to Row.getValue("property1") gives the correct results.
--
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] (JCR-3266) JCR-SQL2 query with multiple columns in
result only returns last column when using Row.getValues()
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-3266:
-------------------------------
Fix Version/s: (was: 2.6)
2.5
> JCR-SQL2 query with multiple columns in result only returns last column when using Row.getValues()
> --------------------------------------------------------------------------------------------------
>
> Key: JCR-3266
> URL: https://issues.apache.org/jira/browse/JCR-3266
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Affects Versions: 2.2.4, 2.4
> Reporter: Nick Tuckett
> Assignee: Julian Reschke
> Fix For: 2.2.12, 2.4.1, 2.5
>
>
> When running a query like below on an in-process repository (via TransientRepository) or via RMI access, a call to Row.getValues() only returns the last column selected:
> SELECT property1, property2 FROM [nodetype]
> QueryResult.getColumnNames() returns the right set of columns.
> Stepping through the code shows that org.apache.jackrabbit.core.query.lucene.join.AbstractRow has the implementation of getValues() - this creates a new Values array, then overwrites it multiple times in a for loop that iterates once per column. That doesn't sound like the desired behaviour.
> Getting values via individual calls to Row.getValue("property1") gives the correct results.
--
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