[Bug 11147] New: [XQuery11] The rule for rewriting nondeterministic function calls is too strict

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11147

           Summary: [XQuery11] The rule for rewriting nondeterministic
                    function calls is too strict
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 1.1
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: josh.spiegel@oracle.com
         QAContact: public-qt-comments@w3.org
             Group: XSLXQuery_WG


The following statement is in section 4.18 Function Declaration:

"When rewriting expressions into equivalent expressions, as described in 2.3.4
Errors and Optimization, a conforming XQuery implementation must ensure that
each run-time invocation of a nondeterministic function in the original
expression results in exactly one run-time invocation of the function in the
rewritten expression."

This statement seems too strict.  An optimizer should be able to eliminate
nondeterministic function calls that do not contribute to the results of the
expression.  

For example, consider this query:

let $x := f()
return
   27

Even if f() is nondeterministic, it seems OK for an optimizer to rewrite this
expression as 27.  

Note, this issue has be discussed previously [1].  One suggestion was to change
the wording as follows [2]:

"If a non-deterministic function call contributes to the results of an
expression, a conforming XQuery implementation must ensure that every result is
generated by a new invocation of the function."

[1] http://lists.w3.org/Archives/Member/w3c-xsl-query/2010Jul/0169.html
[2] http://lists.w3.org/Archives/Member/w3c-xsl-query/2010Jul/0192.html

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 26 October 2010 14:21:37 UTC