```
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.
```

const auto & date_type = static_cast<const DataTypeDateTime64 &>(*type);
            size_t precision = date_type.getPrecision();
            size_t scale = date_type.getScale();
            to_type = std::make_shared<DataTypeDecimal<Decimal64>>(precision, scale);
        }
        else if (which.isFloat())
        {
            max_type = Field::Types::Float64;
            to_type = std::make_shared<DataTypeFloat64>();
        }
        else
            return false;
        if (descr.fill_from.getType() > max_type
            || descr.fill_to.getType() > max_type
            || descr.fill_step.getType() > max_type)
            return false;
        descr.fill_from = convertFieldToType(descr.fill_from, *to_type);
        descr.fill_to = convertFieldToType(descr.fill_to, *to_type);
        descr.fill_step = convertFieldToType(descr.fill_step, *to_type);
        return true;
    };
    std::vector<bool> is_fill_column(header_.columns());
    for (size_t i = 0; i < sort_description.size(); ++i)
    {
        size_t block_position = header_.getPositionByName(sort_description[i].column_name);
        is_fill_column[block_position] = true;
        fill_column_positions.push_back(block_position);
        auto & descr = filling_row.getFillDescription(i);
        const auto & type = header_.getByPosition(block_position).type;
        if (!try_convert_fields(descr, type))