in some cases nan === nan

```
SELECT arrayCompact([1, 1, nan, nan, 2, 3, 3, 3]) AS x

┌─x───────────────┐
│ [1,nan,nan,2,3] │
└─────────────────┘

SELECT arrayCompact([1, 1, nan, nan, 2, 3, 3, inf, inf, 3]) AS x

┌─x─────────────────────┐
│ [1,nan,nan,2,3,inf,3] │
└───────────────────────┘

SELECT arrayCompact([1, 1, nan, nan, 2, 3, 3, inf, inf, 3, NULL, NULL]) AS x

┌─x──────────────────────┐
│ [1,nan,2,3,inf,3,NULL] │ ???
└────────────────────────┘

SELECT arrayCompact([1, 1, inf, nan, NULL, nan, nan]) AS x

┌─x────────────────────┐
│ [1,inf,nan,NULL,nan] │  ???
└──────────────────────┘
```
size_t src_offsets_size = src_offsets.size();
        auto res_offsets_column = ColumnArray::ColumnOffsets::create(src_offsets_size);
        IColumn::Offsets & res_offsets = res_offsets_column->getData();
        size_t res_pos = 0;
        size_t src_pos = 0;
        for (size_t i = 0; i < src_offsets_size; ++i)
        {
            auto src_offset = src_offsets[i];
            
            if (src_pos < src_offset)
            {
                
                res_values_column->insertFrom(*mapped, src_pos);
                
                ++src_pos;
                ++res_pos;
                for (; src_pos < src_offset; ++src_pos)
                {
                    if (mapped->compareAt(src_pos - 1, src_pos, *mapped, 1))
                    {
                        res_values_column->insertFrom(*mapped, src_pos);
                        ++res_pos;
                    }
                }
            }
            res_offsets[i] = res_pos;
        }
        res_ptr = ColumnArray::create(std::move(res_values_column), std::move(res_offsets_column));
    }
    static ColumnPtr execute(const ColumnArray & array, ColumnPtr mapped)