mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 17:20:50 +00:00
Fix
This commit is contained in:
parent
2d4b27a6b5
commit
965e2bfb21
@ -183,6 +183,18 @@ bool checkPositionalArguments(ASTPtr & argument, const ASTSelectQuery * select_q
|
||||
{
|
||||
if (ast_function->arguments)
|
||||
{
|
||||
/// Check that all literal arguments are integers in advance to be able to always
|
||||
/// throw exception at once if argument is out of position bounds.
|
||||
for (auto & arg : ast_function->arguments->children)
|
||||
{
|
||||
if (const auto * ast_literal = typeid_cast<const ASTLiteral *>(arg.get()))
|
||||
{
|
||||
auto which = ast_literal->value.getType();
|
||||
if (which != Field::Types::UInt64)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto & arg : ast_function->arguments->children)
|
||||
positional &= checkPositionalArguments(arg, select_query, expression);
|
||||
}
|
||||
|
@ -152,3 +152,5 @@ SELECT 1 + 1 AS a
|
||||
GROUP BY a
|
||||
select substr('aaaaaaaaaaaaaa', 8) as a group by a;
|
||||
aaaaaaa
|
||||
select substr('aaaaaaaaaaaaaa', 8) as a group by substr('aaaaaaaaaaaaaa', 8);
|
||||
aaaaaaa
|
||||
|
@ -52,3 +52,5 @@ select a, b, c, d, e, f from (select 44 a, 88 b, 13 c, 14 d, 15 e, 16 f) t grou
|
||||
|
||||
explain syntax select plus(1, 1) as a group by a;
|
||||
select substr('aaaaaaaaaaaaaa', 8) as a group by a;
|
||||
select substr('aaaaaaaaaaaaaa', 8) as a group by substr('aaaaaaaaaaaaaa', 8);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user