From 6b1c86c6ec7f852a4e12fca0044c4240a4ff0038 Mon Sep 17 00:00:00 2001 From: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com> Date: Mon, 10 Apr 2023 03:39:13 +0200 Subject: [PATCH] Don't use type conversion with String query parameters --- src/Interpreters/ReplaceQueryParameterVisitor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Interpreters/ReplaceQueryParameterVisitor.cpp b/src/Interpreters/ReplaceQueryParameterVisitor.cpp index fad9d4bbfb2..71f28f9fb2c 100644 --- a/src/Interpreters/ReplaceQueryParameterVisitor.cpp +++ b/src/Interpreters/ReplaceQueryParameterVisitor.cpp @@ -102,7 +102,10 @@ void ReplaceQueryParameterVisitor::visitQueryParameter(ASTPtr & ast) else literal = temp_column[0]; - ast = addTypeConversionToAST(std::make_shared(literal), type_name); + if (typeid_cast(&data_type)) + ast = std::make_shared(literal); + else + ast = addTypeConversionToAST(std::make_shared(literal), type_name); /// Keep the original alias. ast->setAlias(alias);