File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -568,19 +568,24 @@ def _select_rows(self, rows_sel):
568568 if (start is None and rows_sel .start is not None ) or (
569569 stop is None and rows_sel .stop is not None
570570 ):
571+
572+ inc = index_column .is_monotonic_increasing
573+ if inc :
574+ dec = index_column .is_monotonic_decreasing
575+
571576 if start is None and rows_sel .start is not None :
572577 start = rows_sel .start
573- if index_column . is_monotonic_increasing is not False :
578+ if inc is not False :
574579 cond .append (index_column ._scol >= F .lit (start ).cast (index_data_type ))
575- elif index_column . is_monotonic_decreasing is not False :
580+ elif dec is not False :
576581 cond .append (index_column ._scol <= F .lit (start ).cast (index_data_type ))
577582 else :
578583 raise KeyError (rows_sel .start )
579584 if stop is None and rows_sel .stop is not None :
580585 stop = rows_sel .stop
581- if index_column . is_monotonic_increasing is not False :
586+ if inc is not False :
582587 cond .append (index_column ._scol <= F .lit (stop ).cast (index_data_type ))
583- elif index_column . is_monotonic_decreasing is not False :
588+ elif dec is not False :
584589 cond .append (index_column ._scol >= F .lit (stop ).cast (index_data_type ))
585590 else :
586591 raise KeyError (rows_sel .stop )
You can’t perform that action at this time.
0 commit comments