incubator-vxquery-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Carey <>
Subject Re: VXQuery Number Query Plans
Date Thu, 07 Jun 2012 05:46:49 GMT
And the data(.) function is needed for these expressions because...?  :-)
(I'm enjoying following his explorations - great way to learn!)

On 6/6/12 7:54 PM, Vinayak Borkar wrote:
>> My questions:
>>   - in 1. The plan use the function promote. Is this to ensure the type
>> is correct for the addition function?
>>   - in 1b. Why does the type here show anyAtomicType instead of integer?
> The add function you use in the query is defined as an operator in the 
> builtin-operators.xml file. Remember that this operator is 
> polymorphic. It can add integers, doubles, duration to dates etc. So 
> the static type of the operator's argument specify that they should be 
> the supertype of all acceptable argument types and that is 
> anyAtomicType in this case.
> You are correct in that the promote will ensure that the input data is 
> compliant with the expected argument type of the addition function.
> At runtime, the function needs to make sure that the inputs are 
> correct and throw a dynamic error otherwise.
> Vinayak

View raw message