Re: "deterministic" indicator for external functions.

Daniel,

SQL has such a capability and I think that it would be useful if XQuery had 
it, too.  However:

(1) It's important to note that, in SQL, the semantics are such that 
functions declared to be deterministic that are not in fact deterministic 
are, well, implementation-dependent in result.  In other words, if you lie 
to the implementation about a function's determinacy, you're on your 
own.  (I say this largely to emphasize that giving some BNF for a feature 
is not a proposal for the feature; at best, it's a request for somebody to 
start thinking about the feature.)

(2) It would have been much easier to consider this proposal 2 months ago, 
*before* we went to Last Call.  At this point, I am extremely concerned 
that acceptance of proposals like this one endanger the progression of 
XQuery, perhaps to the point that it may miss its window of opportunity 
entirely.  Remember, we're already several years later than originally 
promised, and the community at large is losing faith in our ability to 
deliver.

With regrets, I think this is v.next,
    Jim

At 5/12/2005 08:14 PM, Daniel Engovatov wrote:
>We propose to add an optional clause to the external function declaration 
>to indicate whether the external function always returns the same results 
>for given argument values ("deterministic").
>
>An example use case would be to allow users to indicate that two external 
>functions embedded into xquery: f:random() and 
>f:verySlowDeterministicExternalWebService() should be treated differently 
>by the query processor.
>
>That can be implemented by changing FunctionDecl to
>
>[26]    FunctionDecl    ::=    "declare" "function" QName "(" ParamList? 
>(")" | (")" "as" SequenceType)) (EnclosedExpr | ("external" (<"not" 
>"deterministic"> | "deterministic")?))
>
>Daniel.

========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
   Co-Chair, W3C XML Query WG; F&O (etc.) editor    Fax : +1.801.942.3345
Oracle Corporation        Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive      Standards email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA          Personal email: jim at melton dot name
========================================================================
=  Facts are facts.   But any opinions expressed are the opinions      =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =
======================================================================== 

Received on Friday, 13 May 2005 15:52:29 UTC