```
SELECT *
FROM xrollup

Query id: e702f6fe-8595-4a9f-aeff-ea65e2045801

┌─metric─┬──────────b─┬─v─┐
│      2 │ 2018-01-01 │ 1 │
│      2 │ 2018-02-02 │ 1 │
└────────┴────────────┴───┘
┌─metric─┬──────────b─┬─v─┐
│      1 │ 2018-01-01 │ 1 │
│      1 │ 2018-01-02 │ 1 │
│      1 │ 2018-02-01 │ 1 │
│      1 │ 2017-03-01 │ 1 │
└────────┴────────────┴───┘

6 rows in set. Elapsed: 0.004 sec.
```

`WITH TOTALS + WITH FILL:`

```
SELECT
    b,
    sum(v)
FROM xrollup
GROUP BY b
    WITH TOTALS
ORDER BY b DESC WITH FILL
LIMIT 5

Query id: ae21086d-eb89-4b73-b9be-7baa4c0cee27

┌──────────b─┬─sum(v)─┐
│ 2018-02-02 │      1 │
│ 2018-02-01 │      1 │
│ 2018-01-31 │      0 │
│ 2018-01-30 │      0 │
│ 2018-01-29 │      0 │
└────────────┴────────┘

Totals:
┌──────────b─┬─sum(v)─┐
│ 1970-01-01 │      6 │
└────────────┴────────┘

5 rows in set. Elapsed: 0.003 sec.
```

`WITH TOTALS + WITH FILL FROM:`

```
SELECT
    b,
    sum(v)
FROM xrollup
GROUP BY b
    WITH TOTALS
ORDER BY b DESC WITH FILL FROM today()
LIMIT 5

Query id: cbf3d659-cf10-4b3b-800f-a5af11fc9faa

┌──────────b─┬─sum(v)─┐
│ 2021-02-18 │      0 │
│ 2021-02-17 │      0 │
│ 2021-02-16 │      0 │
│ 2021-02-15 │      0 │
│ 2021-02-14 │      0 │
└────────────┴────────┘

Totals:
┌──────────b─┬─sum(v)─┐
│ 2021-02-18 │      0 │
└────────────┴────────┘

5 rows in set. Elapsed: 0.006 sec.
```

throw Exception("Incompatible types of WITH FILL expression values with column type "
                + type->getName(), ErrorCodes::INVALID_WITH_FILL_EXPRESSION);
        if (type->isValueRepresentedByUnsignedInteger() &&
            ((!descr.fill_from.isNull() && less(descr.fill_from, Field{0}, 1)) ||
                (!descr.fill_to.isNull() && less(descr.fill_to, Field{0}, 1))))
        {
            throw Exception("WITH FILL bound values cannot be negative for unsigned type "
                + type->getName(), ErrorCodes::INVALID_WITH_FILL_EXPRESSION);
        }
    }
    for (size_t i = 0; i < header_.columns(); ++i)
        if (!is_fill_column[i])
            other_column_positions.push_back(i);
}
IProcessor::Status FillingTransform::prepare()
{
    if (input.isFinished() && !output.isFinished() && !has_input && !generate_suffix)
    {
        should_insert_first = next_row < filling_row;
        for (size_t i = 0; i < filling_row.size(); ++i)
            next_row[i] = filling_row.getFillDescription(i).fill_to;
        if (filling_row < next_row)
        {
            generate_suffix = true;
            return Status::Ready;
        }
    }
    return ISimpleTransform::prepare();
}
void FillingTransform::transform(Chunk & chunk)