From 06b03210273a6c6adda4879467c7eff2ba38f32f Mon Sep 17 00:00:00 2001 From: Calum Murray Date: Thu, 1 Feb 2024 10:14:17 -0500 Subject: [PATCH] fix like expression parser Signed-off-by: Calum Murray --- sql/v2/expression/like_expression.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sql/v2/expression/like_expression.go b/sql/v2/expression/like_expression.go index 236c15caf..5f557fa5a 100644 --- a/sql/v2/expression/like_expression.go +++ b/sql/v2/expression/like_expression.go @@ -70,6 +70,9 @@ func convertLikePatternToRegex(pattern string) (*regexp.Regexp, error) { chunk.Reset() i++ continue + } else { + // if there is an actual literal \ character, we need to include that in the string + chunk.WriteRune('\\') } } else if pattern[i] == '_' { // replace with .