[
https://issues.apache.org/jira/browse/VXQUERY-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411232#comment-15411232
]
ASF subversion and git services commented on VXQUERY-226:
---------------------------------------------------------
Commit 4a19104c8ad83b37a2ad9e70fcb3e3fccf883799 in vxquery's branch
refs/heads/master from [~Riyafa Abdul Hameed]
[ https://git-wip-us.apache.org/repos/asf?p=vxquery.git;h=4a19104 ]
VXQUERY-226: Fix key listing and array unboxing
> Issue in JSONiq Object key listing and Array unboxing
> -----------------------------------------------------
>
> Key: VXQUERY-226
> URL: https://issues.apache.org/jira/browse/VXQUERY-226
> Project: VXQuery
> Issue Type: Bug
> Reporter: Riyafa Abdul Hameed
> Assignee: Riyafa Abdul Hameed
>
> The code
> let $x := {
> “name” : {“id” : 123, “first” : “Riyafa”, “Last” : “Abdul Hameed”}
> }
> return $x(“name”)()
> returns
> {“id” : 123, “first” : “Riyafa”, “Last” : “Abdul Hameed”}
> but the code,
> let $x := {
> “name” : {“id” : 123, “first” : “Riyafa”, “Last” : “Abdul Hameed”}
> }
> let $y := $x(“name”)
> return $y()
> returns
> id
> first
> Last
> But, as both code should return:
> id
> first
> Last
> The same issue is present in Array unboxing:
> For example the code
> let $x := [
> [ “mercury”, “venus”, “earth”, “mars” ],
> [ “monday”, “tuesday”, “wednesday”, “thursday” ]
> ]
> return $x(1)()
> returns
> [ “mercury”, “venus”, “earth”, “mars” ]
> while the code
> let $x := [
> [ “mercury”, “venus”, “earth”, “mars” ],
> [ “monday”, “tuesday”, “wednesday”, “thursday” ]
> ]
> let $y := $x(1)
> return $y()
> returns
> mercury
> venus
> earth
> mars
> Here also both should return:
> mercury
> venus
> earth
> mars
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)