```sql
select 1 from numbers(10) intersect select 1 from numbers(10)

SELECT 1
FROM numbers(10)
INTERSECT
SELECT 1
FROM numbers(10)

Query id: 9f2d11c5-269c-41dc-9b4c-8f1423aafcc7

┌─1─┐
│ 1 │
│ 1 │
│ 1 │
│ 1 │
│ 1 │
│ 1 │
│ 1 │
│ 1 │
└───┘

8 rows in set. Elapsed: 0.002 sec. 
```
ColumnRawPtrs column_ptrs;
    column_ptrs.reserve(key_columns_pos.size());
    for (auto pos : key_columns_pos)
        column_ptrs.emplace_back(columns[pos].get());
    if (!data)
        data.emplace();
    if (data->empty())
        data->init(SetVariants::chooseMethod(column_ptrs, key_sizes));
    size_t new_rows_num = 0;
    IColumn::Filter filter(num_rows);
    auto & data_set = *data;
    switch (data->type)
    {
        case SetVariants::Type::EMPTY:
            break;
#define M(NAME) \
    case SetVariants::Type::NAME: \
        new_rows_num = buildFilter(*data_set.NAME, column_ptrs, filter, num_rows, data_set); \
        break;
            APPLY_FOR_SET_VARIANTS(M)
#undef M
    }
    if (!new_rows_num)
        return;
    for (auto & column : columns)
        column = column->filter(filter, -1);
    chunk.setColumns(std::move(columns), new_rows_num);
}
}