From 710ceae903ea5a77bde21ed0c0b84491093b3bbb Mon Sep 17 00:00:00 2001 From: Michael Kolupaev Date: Tue, 14 May 2024 08:37:25 +0000 Subject: [PATCH] Fix insignificant ubsan error in QueryAnalyzer::replaceNodesWithPositionalArguments() --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index b6837c86615..eec1646a72c 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -2329,7 +2329,7 @@ void QueryAnalyzer::replaceNodesWithPositionalArguments(QueryTreeNodePtr & node_ pos = value; else { - if (static_cast(std::abs(value)) > projection_nodes.size()) + if (value < -static_cast(projection_nodes.size())) throw Exception( ErrorCodes::BAD_ARGUMENTS, "Negative positional argument number {} is out of bounds. Expected in range [-{}, -1]. In scope {}",