Menu

#5340 Simplify Spacing_spanner::get_columns

Fixed
Dan Eble
Enhancement
2018-06-16
2018-06-11
Dan Eble
No

Simplify Spacing_spanner::get_columns

The old algorithm filtered the system's list of columns into a list of
used columns, then searched the filtered list for the endpoints of the
range to return.

The search key was the "rank" of a column, which is its index in the
unfiltered list of columns (see System::add_column). There is
therefore no need to search.

The new algorithm selects the desired range in the unfiltered list and
then filters that.

This commit also removes the unused function Paper_column::compare.

http://codereview.appspot.com/348940044

Discussion

  • Anonymous

    Anonymous - 2018-06-12
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2018-06-12

    Passes make, make check and a full make doc.

     
  • Anonymous

    Anonymous - 2018-06-13
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2018-06-13

    Patch on countdown for Jun 13.

     
  • Anonymous

    Anonymous - 2018-06-16
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2018-06-16

    Patch counted down - please push.

     
  • Dan Eble

    Dan Eble - 2018-06-16
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
     
  • Dan Eble

    Dan Eble - 2018-06-16

    commit bb34e5bbfdcf8d10877b5b85a339416f0a03c39b (HEAD -> pushed/issue-5340-used-columns-in-range, origin/staging)
    Author: Dan Eble nine.fierce.ballads@gmail.com
    Date: Mon Jun 11 06:47:48 2018 -0400

    Issue 5340: Simplify Spacing_spanner::get_columns
    
    The old algorithm filtered the system's list of columns into a list of
    used columns, then searched the filtered list for the endpoints of the
    range to return.
    
    The search key was the "rank" of a column, which is its index in the
    unfiltered list of columns (see System::add_column).  There is
    therefore no need to search.
    
    The new algorithm selects the desired range in the unfiltered list and
    then filters that.
    
    This commit also removes the unused function Paper_column::compare.
    
     
MongoDB Logo MongoDB