-
Notifications
You must be signed in to change notification settings - Fork 16
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
150bis revised proposal for fn:ranks #1062
base: master
Are you sure you want to change the base?
Conversation
… separate ranking
I find both of these "amends" a step backwards from the original proposal. What was intentionally pretty simple to understand, and call, function - is now loaded with huge and unnecessary luggage, like multiple key() functions and multiple collations. Despite this awful increase in complexity, some functionality present in the original fn:ranks proposal has been eliminated - users do want to have distinct items within a rank - and this is not supported in this "amended" proposal. For me the original fn:ranks and the function proposed here are two entirely different functions, that should not be mixed together. I firmly believe that it is better to go with the simpler one - easier to use and understand and still giving the user the option of getting distinct results in the ranks, which the new proposal eliminated completely. If someone wants to suppress any good proposal coming from other people, then why we have this so called "community group" at all? |
I think the proposal is simpler than yours because almost all the semantics are copied and reused from fn:sort: it adds capability while reducing the number of words in the spec, and that's generally a good indicator. I took out the functionality involving multiple collations and different comparisons for ordering and equality comparison because after strenuous efforts, I simply couldn't find a good way to take advantage of it. Don't take it personally to have your ideas taken in a different direction by other people. It happens to me all the time, and the result is usually better than what I would have achieved on my own. That's precisely why we have a community group, to throw ideas around until a consensus crystalises. It's always good when a requirement gets creative input and alternative proposed solutions from different people. |
I am not "taking it personally", but I have a few questions:
These are the changes that I see in the new proposal and these are the immediate questions that they raise. In case these issues are eliminated, I would have nothing against the proposal - this is a question of providing the best and simplest to use functionality - not "taking it personally". |
In résponse to your questions:
It may well be my limited understanding, but I haven't seen use cases that explain to me why this functionality is needed. It wasn't clearly identified in the original issue #150, and seems to have crept in later through a kind of "feature creep". Your proposal has two examples that use this functionality, but they only provide input and output, no motivating statement of requirements. In the original exposition of the issue, you pointed to functions available in MS SQL and in particular to the
My belief is that the similarity of the function to In addition, we discovered from user experience that the 3.1 version of I also see (on some closer reading) that |
In SQL everything is a set. Thus every record (row) returned from a query is distinct from all others, so there is no need for further disambiguation. On the other side we still don't have the set datatype in XPath and this is why we still need to rely on functions like
I quite disagree here. If the
The proposed function
Not a requirement that cannot be satisfied - just that all this becomes too-complicated for a sane, everyday developer. The main idea in |
This proposal is an amended/alternative proposal for the fn:ranks function, taking into account the work done on the original issue #150 and the PR #1027 and the comments raised. Acknowledgements to the original author for the idea and for a lot of good work on examples etc.
It amends the previous proposal as follows:
(a) the signature and the semantics are aligned with fn:sort. This adds some functionality (multiple sort keys, ascending/descending) and also removes some complexity (two different collations for comparing input items and result items)
(b) the style of exposition is changed editorially for consistency with other functions