Simplify fromDaysSinceYearZero tests a bit

This commit is contained in:
slvrtrn 2023-11-20 17:31:47 +01:00
parent 6d14350886
commit cd4e674aa3

View File

@ -11,19 +11,19 @@ SELECT fromDaysSinceYearZero(-3); -- { serverError ARGUMENT_OUT_OF_BOUND }
SELECT fromDaysSinceYearZero32(-3); -- { serverError ARGUMENT_OUT_OF_BOUND } SELECT fromDaysSinceYearZero32(-3); -- { serverError ARGUMENT_OUT_OF_BOUND }
SELECT '-- const and non-const arguments'; SELECT '-- const and non-const arguments';
SELECT 719527 AS x, toInt32(719527) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y)); -- outside Date's range SELECT 719527 AS x, toInt32(x) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y)); -- outside Date's range
SELECT 719528 AS x, toInt32(719528) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y)); SELECT 719528 AS x, toInt32(x) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y));
SELECT 719529 AS x, toInt32(719529) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y)); SELECT 719529 AS x, toInt32(x) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y));
SELECT 785062 AS x, toInt32(785062) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y)); SELECT 785062 AS x, toInt32(x) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y));
SELECT 785063 AS x, toInt32(785063) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y)); SELECT 785063 AS x, toInt32(x) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y));
SELECT 785064 AS x, toInt32(785064) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y)); -- outside Date's range SELECT 785064 AS x, toInt32(x) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero(materialize(x)), fromDaysSinceYearZero(y), fromDaysSinceYearZero(materialize(y)); -- outside Date's range
SELECT 693960 AS x, toInt32(693960) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y)); -- outside Date32's range SELECT 693960 AS x, toInt32(x) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y)); -- outside Date32's range
SELECT 693961 AS x, toInt32(693961) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y)); SELECT 693961 AS x, toInt32(x) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y));
SELECT 693962 AS x, toInt32(693962) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y)); SELECT 693962 AS x, toInt32(x) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y));
SELECT 840056 AS x, toInt32(840056) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y)); SELECT 840056 AS x, toInt32(x) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y));
SELECT 840057 AS x, toInt32(840057) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y)); SELECT 840057 AS x, toInt32(x) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y));
SELECT 840058 AS x, toInt32(840058) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y)); -- outside Date32's range SELECT 840058 AS x, toInt32(x) AS y, fromDaysSinceYearZero32(x), fromDaysSinceYearZero32(materialize(x)), fromDaysSinceYearZero32(y), fromDaysSinceYearZero32(materialize(y)); -- outside Date32's range
SELECT '-- integer types != (U)Int32'; SELECT '-- integer types != (U)Int32';
SELECT toUInt8(255) AS x, toInt8(127) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero32(x), fromDaysSinceYearZero(y), fromDaysSinceYearZero32(y); -- outside Date's range for all (U)Int8-s SELECT toUInt8(255) AS x, toInt8(127) AS y, fromDaysSinceYearZero(x), fromDaysSinceYearZero32(x), fromDaysSinceYearZero(y), fromDaysSinceYearZero32(y); -- outside Date's range for all (U)Int8-s