diff options
author | zverevgeny <[email protected]> | 2023-09-06 20:21:46 +0300 |
---|---|---|
committer | zverevgeny <[email protected]> | 2023-09-06 20:54:54 +0300 |
commit | 4567e7d7ab953faf1b342e79f0607a91471eb139 (patch) | |
tree | 5ba2981dc5388647f8dd01e326cdbf5a877ea1a0 | |
parent | 9fae6cc9799a13aecd649ae9a0a356d6cf047e45 (diff) |
clarify ListFromRange elem count for floating point types
-rw-r--r-- | ydb/library/yql/minikql/comp_nodes/mkql_listfromrange.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ydb/library/yql/minikql/comp_nodes/mkql_listfromrange.cpp b/ydb/library/yql/minikql/comp_nodes/mkql_listfromrange.cpp index cb997840153..d4d03092122 100644 --- a/ydb/library/yql/minikql/comp_nodes/mkql_listfromrange.cpp +++ b/ydb/library/yql/minikql/comp_nodes/mkql_listfromrange.cpp @@ -11,7 +11,7 @@ namespace { template<typename T> ui64 ShiftByMaxNegative(T value) { static_assert(sizeof(T) <= sizeof(ui64)); - //static_assert(std::is_integral_v<T>); //TODO fixme, very stange behaviour for floating point types + static_assert(std::is_integral_v<T>); if constexpr (std::is_signed_v<T>) { if (value < 0) { return ui64(value + std::numeric_limits<T>::max() + T(1)); @@ -152,7 +152,7 @@ private: } ui64 GetListLength() const final { - if (std::is_integral<T>()) { + if constexpr (std::is_integral_v<T>) { return GetElementsCount<T, TStep>(Start, End, Step); } @@ -296,7 +296,7 @@ public: #endif private: static NUdf::TUnboxedValuePod MakeList(TComputationContext& ctx, T start, T end, TStep step, ui16 timezoneId) { - if (timezoneId) + if constexpr(TzDate) return ctx.HolderFactory.Create<TTzValue>(ctx, start, end, step, timezoneId); else return ctx.HolderFactory.Create<TValue>(ctx, start, end, step); |