[ 
https://issues.apache.org/jira/browse/VXQUERY-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14647114#comment-14647114
 ] 

Shivani Mall edited comment on VXQUERY-166 at 7/30/15 4:14 AM:
---------------------------------------------------------------

Here is what it all boiled down to.  There is a function called 
encodesequencemap in the static context class which adds name test ('*') to the 
sequencemap(global variable in static context). The first line in this function 
sets int (code) to the value returned by lookupsequuence function. In order for 
encodesequencemap function to add the name test to the sequencemap the 
lookupsequence function must return -1. 

The issue is that lookupsequence function can not return -1. It return -1 only 
when parent(static context) is null. However, when the parent is null, 
sequencemap contains all the values including the name test('*'). Since the 
check for sequencemap comes before the check for parent(!= null), so it returns 
an integer(which is not -1) 

Now when it gets back to the encodesequencemap func,  code is not -1, so it can 
not add the name test to the sequence map. But sequence map is still empty. 
Since the sequence map is empty one of the printer functions runs into null 
pointer exception in an attempt to print this empty seequence.

How can I deal with this? 
I hope I could explain the problem. Please let me know if there is any part 
that needs clarification. 


was (Author: shivani):
Here is what it all boiled down to.  There is function called encodesequencemap 
in the static context class which has adds name test ('*') to the sequencemap. 
The function first looks up the sequence through a lookupsequuence function. In 
order for encodesequencemap function to add the name test to the sequence map 
the lookupsequence function must return -1. 

However, the  lookupsequence function can not return -1. It return -1 only when 
parent(static context) is null. However, when the parent sequence map contains 
all the values including the name test so it instead returns the code of the 
name test and not -1. 

Now when it gets back to the encodesequencemap  code is not -1, so it can not 
add the name test to the sequence map. But sequence map. Since the sequence map 
is empty one of the printer functions runs into null pointer exception in an 
atteempt to print this empty seequence.

How can I deal with this? 
I hope I could explain the problem. Please let me know if there is any part 
that needs clarification. 

> node-test implementation
> ------------------------
>
>                 Key: VXQUERY-166
>                 URL: https://issues.apache.org/jira/browse/VXQUERY-166
>             Project: VXQuery
>          Issue Type: Bug
>            Reporter: Shivani Mall
>
> node test is not implemented yet. XMark Query 19 fails as a result. Should 
> this be dealt as a rewrite rule, in translation or a runtime 
> function/operator?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to