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] │  ???
└──────────────────────┘
```
static bool needBoolean() { return false; }
    static bool needExpression() { return false; }
    static bool needOneArray() { return false; }
    static DataTypePtr getReturnType(const DataTypePtr & nested_type, const DataTypePtr &)
    {
        return std::make_shared<DataTypeArray>(nested_type);
    }
    template <typename T>
    static bool executeType(const ColumnPtr & mapped, const ColumnArray & array, ColumnPtr & res_ptr)
    {
        using ColVecType = std::conditional_t<IsDecimalNumber<T>, ColumnDecimal<T>, ColumnVector<T>>;
        const ColVecType * src_values_column = checkAndGetColumn<ColVecType>(mapped.get());
        if (!src_values_column)
            return false;
        const IColumn::Offsets & src_offsets = array.getOffsets();
        const typename ColVecType::Container & src_values = src_values_column->getData();
        typename ColVecType::MutablePtr res_values_column;
        if constexpr (IsDecimalNumber<T>)
            res_values_column = ColVecType::create(src_values.size(), src_values.getScale());
        else
            res_values_column = ColVecType::create(src_values.size());
        typename ColVecType::Container & res_values = res_values_column->getData();
        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)