This commit is contained in:
Alexander Kuzmenkov 2021-03-19 20:18:17 +03:00
parent 4bf2e94fa4
commit 3166f0cbfc
2 changed files with 4 additions and 4 deletions

View File

@ -588,7 +588,7 @@ static bool tryParseFrameDefinition(ASTWindowDefinition * node, IParser::Pos & p
&& value.get<Int64>() >= 0)))
{
throw Exception(ErrorCodes::BAD_ARGUMENTS,
"Frame offset for '{}' frame must be a nonnegative integer, '{}' of type '{}' given.",
"Frame offset for '{}' frame must be a nonnegative integer, '{}' of type '{}' given.",
WindowFrame::toString(node->frame.type),
applyVisitor(FieldVisitorToString(), value),
Field::Types::toString(value.getType()));
@ -649,7 +649,7 @@ static bool tryParseFrameDefinition(ASTWindowDefinition * node, IParser::Pos & p
&& value.get<Int64>() >= 0)))
{
throw Exception(ErrorCodes::BAD_ARGUMENTS,
"Frame offset for '{}' frame must be a nonnegative integer, '{}' of type '{}' given.",
"Frame offset for '{}' frame must be a nonnegative integer, '{}' of type '{}' given.",
WindowFrame::toString(node->frame.type),
applyVisitor(FieldVisitorToString(), value),
Field::Types::toString(value.getType()));

View File

@ -1463,9 +1463,9 @@ struct WindowFunctionLagLeadInFrame final : public WindowFunction
void windowInsertResultInto(const WindowTransform * transform,
size_t function_index) override
{
auto & current_block = transform->blockAt(transform->current_row);
const auto & current_block = transform->blockAt(transform->current_row);
IColumn & to = *current_block.output_columns[function_index];
auto & workspace = transform->workspaces[function_index];
const auto & workspace = transform->workspaces[function_index];
int offset = 1;
if (argument_types.size() > 1)