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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/01/06 09:50:58 UTC
[jira] [Updated] (OAK-5413) XPath: "union" combined with "or" is
not converted correctly
[ https://issues.apache.org/jira/browse/OAK-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller updated OAK-5413:
--------------------------------
Fix Version/s: (was: 1.5.17)
1.5.18
> XPath: "union" combined with "or" is not converted correctly
> ------------------------------------------------------------
>
> Key: OAK-5413
> URL: https://issues.apache.org/jira/browse/OAK-5413
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: query
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 1.5.18
>
>
> In OAK-4265 a limited form of "union" for XPath was added. However, union queries that contain "or" are not converted properly. For example:
> {noformat}
> //*[@a=1 or @b=1]
> select [jcr:path], [jcr:score], * from [nt:base] as a where [a] = 1
> union select [jcr:path], [jcr:score], * from [nt:base] as a where [b] = 1
> {noformat}
> but
> {noformat}
> (//*[@a=1 or @b=1] | //*[@c=1])
> select [jcr:path], [jcr:score], * from [nt:base] as a where [a] = 1 or [b] = 1
> union select [jcr:path], [jcr:score], * from [nt:base] as a where [c] = 1
> {noformat}
> It should be converted to:
> {noformat}
> select [jcr:path], [jcr:score], * from [nt:base] as a where [a] = 1
> union select [jcr:path], [jcr:score], * from [nt:base] as a where [b] = 1
> union select [jcr:path], [jcr:score], * from [nt:base] as a where [c] = 1
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)