mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Add sanity check to RPNBuilderFunctionTreNode
This commit is contained in:
parent
85e3c31f14
commit
77e7f71e02
@ -396,6 +396,12 @@ size_t RPNBuilderFunctionTreeNode::getArgumentsSize() const
|
||||
|
||||
RPNBuilderTreeNode RPNBuilderFunctionTreeNode::getArgumentAt(size_t index) const
|
||||
{
|
||||
size_t total_arguments = getArgumentsSize();
|
||||
if (index >= total_arguments)
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR,
|
||||
"RPNBuilderFunctionTreeNode has {} arguments, attempted to get argument at index {}",
|
||||
total_arguments, index);
|
||||
|
||||
if (ast_node)
|
||||
{
|
||||
const auto * ast_function = assert_cast<const ASTFunction *>(ast_node);
|
||||
|
Loading…
Reference in New Issue
Block a user