Menu

#272 Improve the interface of "sort"

v1.1.x
closed
None
v1.1.1
Change Request
2018-03-04
2018-01-20
Erik Hänel
No

Improve the interface of the sort command so that it matches to the common way of calling a command:

sort DATA() -set cols=1[2:3]

This will also require to add the possibilty to restrict the lines to be sorted. Also it would be nice, if one would have the possibility to obtain a sorting index vector with -set index instead of directly sorting the data.

Another requirement is to allow to use multiple columns as hierarchical sorting index columns.

Analysis:
This can partly be achieved by adding another interface to the sort routine. To add the possibility to use more than one column as sorting index one has to include a recursion after the first sorting run, which will go for all elements, which are equal in the first column.

Implementation:
The change was implemented as proposed by the analysis. Implementation tests were passed successfully.

Documentation:
The changes were added to the language files. A new documentation article for the command sort was added.

Tests:
The change was added to the automatic tests. No deviations detected. Change request implemented successfully.

Discussion

  • Erik Hänel

    Erik Hänel - 2018-01-20
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-02-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,3 +3,13 @@
     sort DATA() -set cols=1[2:3]
     ~~~
     This will also require to add the possibilty to restrict the lines to be sorted. Also it would be nice, if one would have the possibility to obtain a sorting index vector with `-set index` instead of directly sorting the data.
    +
    +Another requirement is to allow to use multiple columns as hierarchical sorting index columns.
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-02-03
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -7,6 +7,7 @@
     Another requirement is to allow to use multiple columns as hierarchical sorting index columns.
    
     **Analysis:**
    +This can partly be achieved by adding another interface to the sort routine. To add the possibility to use more than one column as sorting index one has to include a recursion after the first sorting run, which will go for all elements, which are equal in the first column.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-02-07
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,7 +10,9 @@
     This can partly be achieved by adding another interface to the sort routine. To add the possibility to use more than one column as sorting index one has to include a recursion after the first sorting run, which will go for all elements, which are equal in the first column.
    
     **Implementation:**
    +The change was implemented as proposed by the analysis. Implementation tests were passed successfully.
    
     **Documentation:**
    +The changes were added to the language files. A new documentation article for the command `sort` was added.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2018-03-04
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -16,3 +16,4 @@
     The changes were added to the language files. A new documentation article for the command `sort` was added.
    
     **Tests:**
    +The change was added to the automatic tests. No deviations detected. Change request implemented successfully.
    
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB