Hi,

I have made a PR with the changes [1].

[1] https://github.com/apache/vxquery/pull/83

Thank you.

Yours sincerely,
Riyafa

On 5 July 2016 at 15:51, Riyafa Abdul Hameed <[email protected]>
wrote:

> Hi,
>
> I was currently concatenating all key-value pairs and passing it as a
> single sequence to the ObjectConstructorScalarEvaluator. For example:
>
> {"key1" : "value1", "key2" :"value2"} would be passed in the form ("key1",
> "value1", "key2", "value2") as arg[0] to the evaluator method of the
> ObjectConstructorScalarEvaluator class. Now I see that since the
> ConcatenateScalarEvaluator is flattening the sequnces, I think I shall
> change the implementation so that arguments to the evaluator method itself
> has the keys followed by value followed by boolean flag.
>
> for example now the TaggedValuePointable args to the evaluator method
> would be: ["key1", "value1", true, "key2", "value2", false].
>
> Thank you.
>
> Yours sincerely,
> Riyafa
>
> On 4 July 2016 at 11:40, Till Westmann <[email protected]> wrote:
>
>> Hi Riyafa,
>>
>> could you show the problem with an example? It's not obvious to me where
>> XQuery's sequence flattening would cause a problem here. The
>> ObjectConstructorScalarEvaluator accepts an array of parameters that
>> represent the pairs that were specified in the object constructor. The
>> parameter array should cleanly separate the individual keys and values -
>> even if the values are sequences.
>>
>> Cheers,
>> Till
>>
>> On 3 Jul 2016, at 4:45, Riyafa Abdul Hameed wrote:
>>
>> Hi,
>>>
>>> When attempting to resolve the issue, I have come across a problem:
>>>
>>> In this case I should recognize if the value is a sequence or not, but
>>> when
>>> creating a sequence to be passed as an argument to the
>>> ObjectConstructorScalarEvaluator, the
>>> ConcatenateScalarEvaluatorFactory[1]
>>> creates a single sequence using the entries in all the sequences passed
>>> to
>>> it.
>>>
>>> I have been wondering how to recognize sequences passed as value in an
>>> Object if ConcatenateScalarEvaluatorFactory removes all the SequenceTags.
>>> Please kindly help with any suggestions.
>>>
>>> [1]
>>>
>>> https://github.com/apache/vxquery/blob/master/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/ConcatenateScalarEvaluatorFactory.java
>>>
>>> Thank you.
>>>
>>> Yours sincerely,
>>> Riyafa
>>>
>>> --
>>> Riyafa Abdul Hameed
>>> Undergraduate, University of Moratuwa
>>>
>>> Email: [email protected]
>>> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
>>> <http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
>>> <http://twitter.com/Riyafa1>
>>>
>>
>
>
> --
> Riyafa Abdul Hameed
> Undergraduate, University of Moratuwa
>
> Email: [email protected]
> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
> <http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
> <http://twitter.com/Riyafa1>
>



-- 
Riyafa Abdul Hameed
Undergraduate, University of Moratuwa

Email: [email protected]
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>

Reply via email to