Riyafa Abdul Hameed created VXQUERY-226:
-------------------------------------------
Summary: 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)