I just noticed that in this paragraph on group by clauses:
"The pre-grouping tuples from which the group is derived have equivalent grouping keys, but these keys are not necessarily identical (for example, the strings "Frog" and "frog" might be equivalent according to the collation in use.) In the post-grouping tuple, each grouping variable is bound to the value of the corresponding grouping key."
It says "the" grouping key, although the sentence before reminds that there may be several equivalent but non identical grouping keys.
My recollection of our intent was that the specific grouping key that is used in the post-grouping tuple, if there are several different (yet equivalent) values in the pre-grouping tuple, is implementation-dependent, but I cannot find it explicitly said.
Example
for $x in (xs:yearMonthDuration("P0Y"), xs:dayTimeDuration("P0D"))
group by $x
return $x
I just noticed that in this paragraph on group by clauses:
"The pre-grouping tuples from which the group is derived have equivalent grouping keys, but these keys are not necessarily identical (for example, the strings "Frog" and "frog" might be equivalent according to the collation in use.) In the post-grouping tuple, each grouping variable is bound to the value of the corresponding grouping key."
It says "the" grouping key, although the sentence before reminds that there may be several equivalent but non identical grouping keys.
My recollection of our intent was that the specific grouping key that is used in the post-grouping tuple, if there are several different (yet equivalent) values in the pre-grouping tuple, is implementation-dependent, but I cannot find it explicitly said.
Example
can return either value.
Or I am missing something?