diff --git a/src/Interpreters/FillingRow.cpp b/src/Interpreters/FillingRow.cpp index bb8661d0ef9..561ac255326 100644 --- a/src/Interpreters/FillingRow.cpp +++ b/src/Interpreters/FillingRow.cpp @@ -76,7 +76,7 @@ bool FillingRow::next(const FillingRow & to_row) auto next_value = row[pos]; getFillDescription(pos).step_func(next_value); - if (less(to_row.row[pos], next_value, getDirection(pos))) + if (less(to_row.row[pos], next_value, getDirection(pos)) || equals(next_value, getFillDescription(pos).fill_to)) return false; row[pos] = next_value; diff --git a/tests/queries/0_stateless/00995_order_by_with_fill.reference b/tests/queries/0_stateless/00995_order_by_with_fill.reference index adb0e1aa2c3..0036aabda40 100644 --- a/tests/queries/0_stateless/00995_order_by_with_fill.reference +++ b/tests/queries/0_stateless/00995_order_by_with_fill.reference @@ -376,11 +376,6 @@ 2019-05-03 4 2019-05-03 1 2019-05-03 -2 -2019-05-01 10 -2019-05-01 7 -2019-05-01 4 -2019-05-01 1 -2019-05-01 -2 *** date WITH FILL TO 2019-06-23 STEP 3, val WITH FILL FROM -10 STEP 2 2019-05-07 -10 2019-05-07 -8 diff --git a/tests/queries/0_stateless/02019_multiple_weird_with_fill.reference b/tests/queries/0_stateless/02019_multiple_weird_with_fill.reference index 822d290564a..703dd6e6aac 100644 --- a/tests/queries/0_stateless/02019_multiple_weird_with_fill.reference +++ b/tests/queries/0_stateless/02019_multiple_weird_with_fill.reference @@ -34,12 +34,3 @@ 6 -4 6 -3 6 -2 -7 -10 -7 -9 -7 -8 -7 -7 -7 -6 -7 -5 -7 -4 -7 -3 -7 -2 diff --git a/tests/queries/0_stateless/02112_with_fill_interval.reference b/tests/queries/0_stateless/02112_with_fill_interval.reference index 4bb99803eb1..a1b1d3b0d4d 100644 --- a/tests/queries/0_stateless/02112_with_fill_interval.reference +++ b/tests/queries/0_stateless/02112_with_fill_interval.reference @@ -103,10 +103,6 @@ 2020-04-01 2 0 2020-04-01 3 0 2020-04-01 4 0 -2020-05-01 1 0 -2020-05-01 2 0 -2020-05-01 3 0 -2020-05-01 4 0 1970-01-04 1970-01-03 1970-01-02