Merge pull request #16286 from ClickHouse/aku/error-context

Add more context to error messages
This commit is contained in:
alexey-milovidov 2020-10-24 07:28:36 +03:00 committed by GitHub
commit 7e4079dca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 163 additions and 153 deletions

View File

@ -316,6 +316,7 @@ void ExpressionAction::prepare(Block & sample_block, const Settings & settings,
{
auto & result = sample_block.getByName(result_name);
result.type = result_type;
result.name = result_name;
result.column = source.column;
}
else
@ -1560,6 +1561,7 @@ const ActionsDAG::Node & ActionsDAG::addFunction(
ColumnWithTypeAndName argument;
argument.column = child.column;
argument.type = child.result_type;
argument.name = child.result_name;
if (!argument.column || !isColumnConst(*argument.column))
all_const = false;

View File

@ -29,7 +29,15 @@ public:
if constexpr (!_top_to_bottom)
visitChildren(ast);
Matcher::visit(ast, data);
try
{
Matcher::visit(ast, data);
}
catch (Exception & e)
{
e.addMessage("While processing {}", ast->formatForErrorMessage());
throw;
}
if constexpr (_top_to_bottom)
visitChildren(ast);

View File

@ -1,6 +1,6 @@
SELECT toTimeZone(N, \'UTC\')
Code: 43: Illegal type Date of argument of function toTimeZone. Should be DateTime or DateTime64.
Code: 43
"DateTime('UTC')","2019-09-16 16:20:11"
"DateTime64(3, 'UTC')","2019-09-16 16:20:11.234"
------------------------------------------
@ -36,19 +36,19 @@ SELECT toDayOfWeek(N)
------------------------------------------
SELECT toHour(N)
Code: 43: Illegal type Date of argument for function toHour.
Code: 43
"UInt8",19
"UInt8",19
------------------------------------------
SELECT toMinute(N)
Code: 43: Illegal type Date of argument for function toMinute.
Code: 43
"UInt8",20
"UInt8",20
------------------------------------------
SELECT toSecond(N)
Code: 43: Illegal type Date of argument for function toSecond.
Code: 43
"UInt8",11
"UInt8",11
------------------------------------------
@ -94,31 +94,31 @@ SELECT toStartOfDay(N)
------------------------------------------
SELECT toStartOfHour(N)
Code: 43: Illegal type Date of argument for function toStartOfHour.
Code: 43
"DateTime('Europe/Minsk')","2019-09-16 19:00:00"
"DateTime('Europe/Minsk')","2019-09-16 19:00:00"
------------------------------------------
SELECT toStartOfMinute(N)
Code: 43: Illegal type Date of argument for function toStartOfMinute.
Code: 43
"DateTime('Europe/Minsk')","2019-09-16 19:20:00"
"DateTime('Europe/Minsk')","2019-09-16 19:20:00"
------------------------------------------
SELECT toStartOfFiveMinute(N)
Code: 43: Illegal type Date of argument for function toStartOfFiveMinute.
Code: 43
"DateTime('Europe/Minsk')","2019-09-16 19:20:00"
"DateTime('Europe/Minsk')","2019-09-16 19:20:00"
------------------------------------------
SELECT toStartOfTenMinutes(N)
Code: 43: Illegal type Date of argument for function toStartOfTenMinutes.
Code: 43
"DateTime('Europe/Minsk')","2019-09-16 19:20:00"
"DateTime('Europe/Minsk')","2019-09-16 19:20:00"
------------------------------------------
SELECT toStartOfFifteenMinutes(N)
Code: 43: Illegal type Date of argument for function toStartOfFifteenMinutes.
Code: 43
"DateTime('Europe/Minsk')","2019-09-16 19:15:00"
"DateTime('Europe/Minsk')","2019-09-16 19:15:00"
------------------------------------------
@ -139,7 +139,7 @@ SELECT toStartOfInterval(N, INTERVAL 1 day)
------------------------------------------
SELECT toStartOfInterval(N, INTERVAL 15 minute)
Code: 43: Illegal type Date of argument for function toStartOfInterval.
Code: 43
"DateTime('Europe/Minsk')","2019-09-16 19:15:00"
"DateTime('Europe/Minsk')","2019-09-16 19:15:00"
------------------------------------------
@ -160,13 +160,13 @@ SELECT date_trunc(\'day\', N)
------------------------------------------
SELECT date_trunc(\'minute\', N)
Code: 43: Illegal type Date of argument for function date_trunc.
Code: 43
"DateTime('Europe/Minsk')","2019-09-16 19:20:00"
"DateTime('Europe/Minsk')","2019-09-16 19:20:00"
------------------------------------------
SELECT toTime(N)
Code: 43: Illegal type Date of argument for function toTime.
Code: 43
"DateTime('Europe/Minsk')","1970-01-02 19:20:11"
"DateTime('Europe/Minsk')","1970-01-02 19:20:11"
------------------------------------------
@ -232,7 +232,7 @@ SELECT toYearWeek(N)
------------------------------------------
SELECT timeSlot(N)
Code: 43: Illegal type Date of argument for function timeSlot.
Code: 43
"DateTime('Europe/Minsk')","2019-09-16 19:00:00"
"DateTime('Europe/Minsk')","2019-09-16 19:00:00"
------------------------------------------
@ -375,15 +375,15 @@ SELECT N - N
"Int32",0
"Int32",0
Code: 43: Illegal types DateTime64(3, 'Europe/Minsk') and DateTime64(3, 'Europe/Minsk') of arguments of function minus.
Code: 43
------------------------------------------
SELECT N + N
Code: 43: Illegal types Date and Date of arguments of function plus.
Code: 43
Code: 43: Illegal types DateTime('Europe/Minsk') and DateTime('Europe/Minsk') of arguments of function plus.
Code: 43
Code: 43: Illegal types DateTime64(3, 'Europe/Minsk') and DateTime64(3, 'Europe/Minsk') of arguments of function plus.
Code: 43
------------------------------------------
SELECT N != N
"UInt8",0
@ -417,47 +417,47 @@ SELECT N >= N
------------------------------------------
SELECT N - DT
Code: 43: Illegal types Date and DateTime('Europe/Minsk') of arguments of function minus.
Code: 43
"Int32",0
Code: 43: Illegal types DateTime64(3, 'Europe/Minsk') and DateTime('Europe/Minsk') of arguments of function minus.
Code: 43
------------------------------------------
SELECT DT - N
Code: 43: Illegal types DateTime('Europe/Minsk') and Date of arguments of function minus.
Code: 43
"Int32",0
Code: 43: Illegal types DateTime('Europe/Minsk') and DateTime64(3, 'Europe/Minsk') of arguments of function minus.
Code: 43
------------------------------------------
SELECT N - D
"Int32",0
Code: 43: Illegal types DateTime('Europe/Minsk') and Date of arguments of function minus.
Code: 43
Code: 43: Illegal types DateTime64(3, 'Europe/Minsk') and Date of arguments of function minus.
Code: 43
------------------------------------------
SELECT D - N
"Int32",0
Code: 43: Illegal types Date and DateTime('Europe/Minsk') of arguments of function minus.
Code: 43
Code: 43: Illegal types Date and DateTime64(3, 'Europe/Minsk') of arguments of function minus.
Code: 43
------------------------------------------
SELECT N - DT64
Code: 43: Illegal types Date and DateTime64(3, 'Europe/Minsk') of arguments of function minus.
Code: 43
Code: 43: Illegal types DateTime('Europe/Minsk') and DateTime64(3, 'Europe/Minsk') of arguments of function minus.
Code: 43
Code: 43: Illegal types DateTime64(3, 'Europe/Minsk') and DateTime64(3, 'Europe/Minsk') of arguments of function minus.
Code: 43
------------------------------------------
SELECT DT64 - N
Code: 43: Illegal types DateTime64(3, 'Europe/Minsk') and Date of arguments of function minus.
Code: 43
Code: 43: Illegal types DateTime64(3, 'Europe/Minsk') and DateTime('Europe/Minsk') of arguments of function minus.
Code: 43
Code: 43: Illegal types DateTime64(3, 'Europe/Minsk') and DateTime64(3, 'Europe/Minsk') of arguments of function minus.
Code: 43
------------------------------------------
SELECT N != DT
"UInt8",1
@ -726,11 +726,11 @@ SELECT N - toUInt8(1)
------------------------------------------
SELECT toUInt8(1) - N
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
------------------------------------------
SELECT N - toInt8(-1)
"Date","2019-09-17"
@ -739,11 +739,11 @@ SELECT N - toInt8(-1)
------------------------------------------
SELECT toInt8(-1) - N
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
------------------------------------------
SELECT N - toUInt16(1)
"Date","2019-09-15"
@ -752,11 +752,11 @@ SELECT N - toUInt16(1)
------------------------------------------
SELECT toUInt16(1) - N
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
------------------------------------------
SELECT N - toInt16(-1)
"Date","2019-09-17"
@ -765,11 +765,11 @@ SELECT N - toInt16(-1)
------------------------------------------
SELECT toInt16(-1) - N
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
------------------------------------------
SELECT N - toUInt32(1)
"Date","2019-09-15"
@ -778,11 +778,11 @@ SELECT N - toUInt32(1)
------------------------------------------
SELECT toUInt32(1) - N
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
------------------------------------------
SELECT N - toInt32(-1)
"Date","2019-09-17"
@ -791,11 +791,11 @@ SELECT N - toInt32(-1)
------------------------------------------
SELECT toInt32(-1) - N
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
------------------------------------------
SELECT N - toUInt64(1)
"Date","2019-09-15"
@ -804,11 +804,11 @@ SELECT N - toUInt64(1)
------------------------------------------
SELECT toUInt64(1) - N
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
------------------------------------------
SELECT N - toInt64(-1)
"Date","2019-09-17"
@ -817,585 +817,585 @@ SELECT N - toInt64(-1)
------------------------------------------
SELECT toInt64(-1) - N
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
Code: 43: Wrong order of arguments for function minus: argument of type Interval cannot be first..
Code: 43
------------------------------------------
SELECT N == toUInt8(1)
Code: 43: Illegal types of arguments (Date, UInt8) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt8(1) == N
Code: 43: Illegal types of arguments (UInt8, Date) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N == toInt8(-1)
Code: 43: Illegal types of arguments (Date, Int8) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt8(-1) == N
Code: 43: Illegal types of arguments (Int8, Date) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N == toUInt16(1)
Code: 43: Illegal types of arguments (Date, UInt16) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt16(1) == N
Code: 43: Illegal types of arguments (UInt16, Date) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N == toInt16(-1)
Code: 43: Illegal types of arguments (Date, Int16) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt16(-1) == N
Code: 43: Illegal types of arguments (Int16, Date) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N == toUInt32(1)
Code: 43: Illegal types of arguments (Date, UInt32) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt32(1) == N
Code: 43: Illegal types of arguments (UInt32, Date) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N == toInt32(-1)
Code: 43: Illegal types of arguments (Date, Int32) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt32(-1) == N
Code: 43: Illegal types of arguments (Int32, Date) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N == toUInt64(1)
Code: 43: Illegal types of arguments (Date, UInt64) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt64(1) == N
Code: 43: Illegal types of arguments (UInt64, Date) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N == toInt64(-1)
Code: 43: Illegal types of arguments (Date, Int64) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt64(-1) == N
Code: 43: Illegal types of arguments (Int64, Date) of function equals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N != toUInt8(1)
Code: 43: Illegal types of arguments (Date, UInt8) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt8(1) != N
Code: 43: Illegal types of arguments (UInt8, Date) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N != toInt8(-1)
Code: 43: Illegal types of arguments (Date, Int8) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt8(-1) != N
Code: 43: Illegal types of arguments (Int8, Date) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N != toUInt16(1)
Code: 43: Illegal types of arguments (Date, UInt16) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt16(1) != N
Code: 43: Illegal types of arguments (UInt16, Date) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N != toInt16(-1)
Code: 43: Illegal types of arguments (Date, Int16) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt16(-1) != N
Code: 43: Illegal types of arguments (Int16, Date) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N != toUInt32(1)
Code: 43: Illegal types of arguments (Date, UInt32) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt32(1) != N
Code: 43: Illegal types of arguments (UInt32, Date) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N != toInt32(-1)
Code: 43: Illegal types of arguments (Date, Int32) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt32(-1) != N
Code: 43: Illegal types of arguments (Int32, Date) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N != toUInt64(1)
Code: 43: Illegal types of arguments (Date, UInt64) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt64(1) != N
Code: 43: Illegal types of arguments (UInt64, Date) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N != toInt64(-1)
Code: 43: Illegal types of arguments (Date, Int64) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt64(-1) != N
Code: 43: Illegal types of arguments (Int64, Date) of function notEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N < toUInt8(1)
Code: 43: Illegal types of arguments (Date, UInt8) of function less.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt8(1) < N
Code: 43: Illegal types of arguments (UInt8, Date) of function less.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N < toInt8(-1)
Code: 43: Illegal types of arguments (Date, Int8) of function less.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt8(-1) < N
Code: 43: Illegal types of arguments (Int8, Date) of function less.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N < toUInt16(1)
Code: 43: Illegal types of arguments (Date, UInt16) of function less.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt16(1) < N
Code: 43: Illegal types of arguments (UInt16, Date) of function less.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N < toInt16(-1)
Code: 43: Illegal types of arguments (Date, Int16) of function less.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt16(-1) < N
Code: 43: Illegal types of arguments (Int16, Date) of function less.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N < toUInt32(1)
Code: 43: Illegal types of arguments (Date, UInt32) of function less.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt32(1) < N
Code: 43: Illegal types of arguments (UInt32, Date) of function less.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N < toInt32(-1)
Code: 43: Illegal types of arguments (Date, Int32) of function less.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt32(-1) < N
Code: 43: Illegal types of arguments (Int32, Date) of function less.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N < toUInt64(1)
Code: 43: Illegal types of arguments (Date, UInt64) of function less.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt64(1) < N
Code: 43: Illegal types of arguments (UInt64, Date) of function less.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N < toInt64(-1)
Code: 43: Illegal types of arguments (Date, Int64) of function less.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt64(-1) < N
Code: 43: Illegal types of arguments (Int64, Date) of function less.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N <= toUInt8(1)
Code: 43: Illegal types of arguments (Date, UInt8) of function lessOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt8(1) <= N
Code: 43: Illegal types of arguments (UInt8, Date) of function lessOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N <= toInt8(-1)
Code: 43: Illegal types of arguments (Date, Int8) of function lessOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt8(-1) <= N
Code: 43: Illegal types of arguments (Int8, Date) of function lessOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N <= toUInt16(1)
Code: 43: Illegal types of arguments (Date, UInt16) of function lessOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt16(1) <= N
Code: 43: Illegal types of arguments (UInt16, Date) of function lessOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N <= toInt16(-1)
Code: 43: Illegal types of arguments (Date, Int16) of function lessOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt16(-1) <= N
Code: 43: Illegal types of arguments (Int16, Date) of function lessOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N <= toUInt32(1)
Code: 43: Illegal types of arguments (Date, UInt32) of function lessOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt32(1) <= N
Code: 43: Illegal types of arguments (UInt32, Date) of function lessOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N <= toInt32(-1)
Code: 43: Illegal types of arguments (Date, Int32) of function lessOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt32(-1) <= N
Code: 43: Illegal types of arguments (Int32, Date) of function lessOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N <= toUInt64(1)
Code: 43: Illegal types of arguments (Date, UInt64) of function lessOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toUInt64(1) <= N
Code: 43: Illegal types of arguments (UInt64, Date) of function lessOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N <= toInt64(-1)
Code: 43: Illegal types of arguments (Date, Int64) of function lessOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT toInt64(-1) <= N
Code: 43: Illegal types of arguments (Int64, Date) of function lessOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT N > toUInt8(1)
Code: 43: Illegal types of arguments (Date, UInt8) of function greater.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt8(1) > N
Code: 43: Illegal types of arguments (UInt8, Date) of function greater.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N > toInt8(-1)
Code: 43: Illegal types of arguments (Date, Int8) of function greater.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt8(-1) > N
Code: 43: Illegal types of arguments (Int8, Date) of function greater.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N > toUInt16(1)
Code: 43: Illegal types of arguments (Date, UInt16) of function greater.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt16(1) > N
Code: 43: Illegal types of arguments (UInt16, Date) of function greater.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N > toInt16(-1)
Code: 43: Illegal types of arguments (Date, Int16) of function greater.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt16(-1) > N
Code: 43: Illegal types of arguments (Int16, Date) of function greater.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N > toUInt32(1)
Code: 43: Illegal types of arguments (Date, UInt32) of function greater.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt32(1) > N
Code: 43: Illegal types of arguments (UInt32, Date) of function greater.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N > toInt32(-1)
Code: 43: Illegal types of arguments (Date, Int32) of function greater.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt32(-1) > N
Code: 43: Illegal types of arguments (Int32, Date) of function greater.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N > toUInt64(1)
Code: 43: Illegal types of arguments (Date, UInt64) of function greater.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt64(1) > N
Code: 43: Illegal types of arguments (UInt64, Date) of function greater.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N > toInt64(-1)
Code: 43: Illegal types of arguments (Date, Int64) of function greater.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt64(-1) > N
Code: 43: Illegal types of arguments (Int64, Date) of function greater.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N >= toUInt8(1)
Code: 43: Illegal types of arguments (Date, UInt8) of function greaterOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt8(1) >= N
Code: 43: Illegal types of arguments (UInt8, Date) of function greaterOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N >= toInt8(-1)
Code: 43: Illegal types of arguments (Date, Int8) of function greaterOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt8(-1) >= N
Code: 43: Illegal types of arguments (Int8, Date) of function greaterOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N >= toUInt16(1)
Code: 43: Illegal types of arguments (Date, UInt16) of function greaterOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt16(1) >= N
Code: 43: Illegal types of arguments (UInt16, Date) of function greaterOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N >= toInt16(-1)
Code: 43: Illegal types of arguments (Date, Int16) of function greaterOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt16(-1) >= N
Code: 43: Illegal types of arguments (Int16, Date) of function greaterOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N >= toUInt32(1)
Code: 43: Illegal types of arguments (Date, UInt32) of function greaterOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt32(1) >= N
Code: 43: Illegal types of arguments (UInt32, Date) of function greaterOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N >= toInt32(-1)
Code: 43: Illegal types of arguments (Date, Int32) of function greaterOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt32(-1) >= N
Code: 43: Illegal types of arguments (Int32, Date) of function greaterOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N >= toUInt64(1)
Code: 43: Illegal types of arguments (Date, UInt64) of function greaterOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toUInt64(1) >= N
Code: 43: Illegal types of arguments (UInt64, Date) of function greaterOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------
SELECT N >= toInt64(-1)
Code: 43: Illegal types of arguments (Date, Int64) of function greaterOrEquals.
Code: 43
"UInt8",1
"UInt8",1
------------------------------------------
SELECT toInt64(-1) >= N
Code: 43: Illegal types of arguments (Int64, Date) of function greaterOrEquals.
Code: 43
"UInt8",0
"UInt8",0
------------------------------------------

View File

@ -12,4 +12,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
"${CURDIR}"/00921_datetime64_compatibility.python \
| ${CLICKHOUSE_CLIENT} --ignore-error -T -nm --calculate_text_stack_trace 0 --log-level 'error' 2>&1 \
| sed -Ee 's/Received exception from server .*//g; s/(Code: [0-9]+). DB::Exception: Received from .* DB::Exception/\1/g'
| sed 's/Received exception .*//g; s/^\(Code: [0-9]\+\).*$/\1/g'