mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Fix error
This commit is contained in:
parent
b87d12494e
commit
000b6ac81c
@ -244,7 +244,7 @@ private:
|
||||
|
||||
static inline LUTIndex toLUTIndex(ExtendedDayNum d)
|
||||
{
|
||||
return normalizeLUTIndex(static_cast<UInt32>(d + daynum_offset_epoch));
|
||||
return normalizeLUTIndex(static_cast<Int64>(d + daynum_offset_epoch));
|
||||
}
|
||||
|
||||
inline LUTIndex toLUTIndex(Time t) const
|
||||
@ -252,10 +252,9 @@ private:
|
||||
return findIndex(t);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline LUTIndex toLUTIndex(T i)
|
||||
static inline LUTIndex toLUTIndex(LUTIndex i)
|
||||
{
|
||||
return LUTIndex(static_cast<UInt32>(i));
|
||||
return i;
|
||||
}
|
||||
|
||||
template <typename DateOrTime>
|
||||
|
@ -105,7 +105,7 @@ template <typename T>
|
||||
void SerializationNumber<T>::serializeBinary(const Field & field, WriteBuffer & ostr) const
|
||||
{
|
||||
/// ColumnVector<T>::ValueType is a narrower type. For example, UInt8, when the Field type is UInt64
|
||||
typename ColumnVector<T>::ValueType x = field.get<FieldType>();
|
||||
typename ColumnVector<T>::ValueType x = static_cast<typename ColumnVector<T>::ValueType>(field.get<FieldType>());
|
||||
writeBinary(x, ostr);
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,7 @@ struct ToDateTransform32Or64Signed
|
||||
|
||||
return (from < DATE_LUT_MAX_DAY_NUM)
|
||||
? from
|
||||
: std::min<Int32>(Int32(time_zone.toDayNum(from)), Int32(0xFFFFFFFF));
|
||||
: std::min<Int32>(Int32(time_zone.toDayNum(static_cast<UInt16>(from))), Int32(0xFFFFFFFF));
|
||||
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user