W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2011

[Bug 15044] [XQuery30] group by variables with associated expressions

From: <bugzilla@jessica.w3.org>
Date: Sat, 10 Dec 2011 17:38:50 +0000
To: public-qt-comments@w3.org
Message-Id: <E1RZQss-00066A-O9@jessica.w3.org>

Jonathan Robie <jonathan.robie@gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #2 from Jonathan Robie <jonathan.robie@gmail.com> 2011-12-10 17:38:50 UTC ---
I went back and looked at the proposal and the text more carefully, and I think
the current text and example are correct.

Your proposal assumes the old group by semantics, and defines the new semantics
in terms of it. As I implemented it, I reversed this. The current text is based
on the new definition in Mike Kay's proposal, which simplified the model, and
defines the semantics of a GroupingSpec that does not contain an ExprSingle by
doing a transformation to a GroupingSpec that does.

I modified the example accordingly. The direction of the transformation is

Here's the text from your proposal:

<quote src="Andrew's Proposal">
If a group by clause contains variables that are bound to values, then it 
is semantically equivalent to one or more let clauses followed by a 
simplified group by clause, each containing variable that is not bound to 
a value. 

For example, the clause

group by $g1, $g2 := $expr1, $g3 := $expr2 collation "Spanish"

is semantically equivalent to the following sequence of clauses:

let $g2 := $expr1
let $g3 := $expr2
group by $g1, $g2, $g3 collation "Spanish"

Here's the corresponding text as implemented:

<quote src="Current Internal Working Draft">
For each pre-grouping tuple, the grouping keys are computed by evaluating the
expression in the GroupingSpec and atomizing the result. If the GroupingSpec
does not contain an ExprSingle, an implicit expression is created, consisting
of a variable reference with the same name as the grouping variable. Thus,

group by $g1 collation "Spanish"

is equivalent to:

group by $g1 := $g1 collation "Spanish"

Configure bugmail: https://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 Saturday, 10 December 2011 17:38:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:37 UTC