From 1104f218aa15a451d8f35b34cc5200ac6e028933 Mon Sep 17 00:00:00 2001 From: Arthur Passos Date: Tue, 20 Dec 2022 07:38:49 -0300 Subject: [PATCH] fix escape function --- src/Functions/extractKeyValuePairs.cpp | 8 +++++--- src/Functions/extractKeyValuePairs.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Functions/extractKeyValuePairs.cpp b/src/Functions/extractKeyValuePairs.cpp index 447ccc31f1d..2dd73203736 100644 --- a/src/Functions/extractKeyValuePairs.cpp +++ b/src/Functions/extractKeyValuePairs.cpp @@ -210,17 +210,19 @@ ExtractKeyValuePairs::RawColumns ExtractKeyValuePairs::extract(std::shared_ptr; - ReplaceString::vector(raw_keys->getChars(), raw_keys->getOffsets(), "\\", "", escaped_keys->getChars(), escaped_keys->getOffsets()); - ReplaceString::vector(raw_values->getChars(), raw_values->getOffsets(), "\\", "", escaped_values->getChars(), escaped_values->getOffsets()); + ReplaceString::vector(raw_keys->getChars(), raw_keys->getOffsets(), escape_character_string, "", escaped_keys->getChars(), escaped_keys->getOffsets()); + ReplaceString::vector(raw_values->getChars(), raw_values->getOffsets(), escape_character_string, "", escaped_values->getChars(), escaped_values->getOffsets()); ColumnPtr keys_ptr = std::move(escaped_keys); diff --git a/src/Functions/extractKeyValuePairs.h b/src/Functions/extractKeyValuePairs.h index 148de41a359..ce0656578bc 100644 --- a/src/Functions/extractKeyValuePairs.h +++ b/src/Functions/extractKeyValuePairs.h @@ -72,7 +72,7 @@ private: static RawColumns extract(std::shared_ptr> extractor, ColumnPtr data_column); - static ColumnPtr escape(RawColumns & raw_columns); + static ColumnPtr escape(RawColumns & raw_columns, char escape_character); ColumnNumbers getArgumentsThatAreAlwaysConstant() const override; };