fix arrasSlice for gereric arrays [#CLICKHOUSE-2090]

This commit is contained in:
Nikolai Kochetov 2017-09-01 20:41:43 +03:00
parent 463c05b33d
commit 32ed1b0b41

View File

@ -897,7 +897,7 @@ inline ALWAYS_INLINE void writeSlice(const StringSource::Slice & slice, FixedStr
/// Assuming same types of underlying columns for slice and sink if (ArraySlice, ArraySink) is (GenericArraySlice, GenericArraySink).
inline ALWAYS_INLINE void writeSlice(const GenericArraySlice & slice, GenericArraySink & sink)
{
if (typeid(slice.elements) == typeid(&sink.elements))
if (typeid(slice.elements) == typeid(static_cast<const IColumn *>(&sink.elements)))
sink.elements.insertRangeFrom(*slice.elements, slice.begin, slice.size);
else
throw Exception("Function writeSlice expect same column types for GenericArraySlice and GenericArraySink.",