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; };