``` sql
SELECT NULL, uniqUpTo(2)([[], [], ['', 'aa', NULL], ['\0\0', '\0'], []], x) FROM (SELECT arrayJoin([[uniq(['aaaa', NULL, '', ''], [[], ['', '', NULL, NULL, ''], []])]]) AS x)
```

```
../src/Common/FieldVisitors.h:148:22: runtime error: nan is outside the range of representable values of type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/Common/FieldVisitors.h:148:22 in
```
#pragma once
#include <Core/DecimalFunctions.h>
#include <Core/Field.h>
#include <common/demangle.h>
class SipHash;
namespace DB
{
namespace ErrorCodes
{
    extern const int CANNOT_CONVERT_TYPE;
    extern const int LOGICAL_ERROR;
    extern const int NOT_IMPLEMENTED;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
UInt128 stringToUUID(const String & str);
#pragma GCC diagnostic pop
/** StaticVisitor (and its descendants) - class with overloaded operator() for all types of fields.
  * You could call visitor for field using function 'applyVisitor'.
  * Also "binary visitor" is supported - its operator() takes two arguments.
  */
template <typename R = void>
struct StaticVisitor
{
    using ResultType = R;
};
template <typename Visitor, typename F>
auto applyVisitor(Visitor && visitor, F && field)