[ 
https://issues.apache.org/jira/browse/OAK-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davide Giannella closed OAK-5413.
---------------------------------

Bulk close for 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)

Reply via email to