```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. 
```
{
    typename Method::State state(columns, key_sizes, nullptr);
    for (size_t i = 0; i < rows; ++i)
        state.emplaceKey(method.data, i, variants.string_pool);
}
template <typename Method>
size_t IntersectOrExceptTransform::buildFilter(
    Method & method, const ColumnRawPtrs & columns, IColumn::Filter & filter, size_t rows, SetVariants & variants) const
{
    typename Method::State state(columns, key_sizes, nullptr);
    size_t new_rows_num = 0;
    for (size_t i = 0; i < rows; ++i)
    {
        auto find_result = state.findKey(method.data, i, variants.string_pool);
        filter[i] = current_operator == ASTSelectIntersectExceptQuery::Operator::EXCEPT ? !find_result.isFound() : find_result.isFound();
        if (filter[i])
            ++new_rows_num;
    }
    return new_rows_num;
}
void IntersectOrExceptTransform::accumulate(Chunk chunk)