-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another issue related to 'errata-query-11' (sequence versus multiset) #95
Comments
On the other hand, we know there is interest in things like sorted |
@kasei I have been looking at the options to implement your proposal. I see two main options. Option 1
The change would be to replace each of the two occurrences of
Option 2
The change would be:
The effect of both of these options is the same: The second argument that is passed to the Group operator is a sequence of solution mappings (rather than a multiset of solution mappings), exactly as is already claimed in the current definition of the Group operator. The next step would then be to change the definitions of both the Group operator and the Aggregation operator to really produce and operate on partial functions from keys to solution sequences. In this context, the function M that is used in the definition of the Aggregation operator would then produce a list of tuples (rather than a set of tuples as is the case at the moment). A follow-up consequence of that is then that the set functions take a list of tuples as argument, rather than a (multi)set of tuples. The latter makes me wonder whether we should still call them set functions in this case? |
I think I prefer the change to happen in the translation stage. That seems to me likely to be easier to extend for things like adding an
|
… into solution sequences rather then sets/multisets of solutions; see #95 (comment)
PR #98 has addressed this issue. |
When looking at errata-query-11, another question came to my mind. The suggest fix for the errata also proposes to
in the definition of the Aggregation operator. In particular, this proposal is about the first line of the definition, which ends as follows.
"[...] and let { key1→Ω1, ..., keym→Ωm } be a multiset of partial functions from keys to solution sequences as produced by the grouping step."
I certainly agree with the proposal to replace "multiset" by "set". However, I wonder why the definition talks about "solution sequences"?
While I see that the corresponding definition of "the grouping step"---that is, the definition of the Group operator---also says that it "produc[es] a set of partial functions from keys to solution sequences," the partial functions produced by the actual formula of this definition (as copied below) are from keys to multisets (or sets?) of solution mappings, not to sequences of solution mappings.
(Notice that
Ω
is a multiset of solution mappings because that is passed to the Group operator by the Evaluation of Group, where it is obtained fromeval(D(G), P)
withP
being "the algebra translation of the GroupGraphPattern of the query level" according to the translation algorithm for aggregates in Section 18.2.4.1 Grouping and Aggregation).Consequently, in addition to replacing "multiset" by "set", I propose to also replace "solution sequences" by "sets of solution mappings", and this latter replacement should be done not only in the definition of the Aggregation operator but also in the definition of the Group operator.
The text was updated successfully, but these errors were encountered: