From 62f2307c7a056c2df5621191791ee295d3d086c0 Mon Sep 17 00:00:00 2001 From: Jia-Xuan Liu Date: Wed, 11 Sep 2024 23:24:06 +0800 Subject: [PATCH] compare substring first --- datafusion/functions/src/unicode/strpos.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/functions/src/unicode/strpos.rs b/datafusion/functions/src/unicode/strpos.rs index 4ff0ae3afe4c..6da67c8a2798 100644 --- a/datafusion/functions/src/unicode/strpos.rs +++ b/datafusion/functions/src/unicode/strpos.rs @@ -141,7 +141,7 @@ where V1: StringArrayType<'a, Item = &'a str>, V2: StringArrayType<'a, Item = &'a str>, { - let ascii_only = string_array.is_ascii() && substring_array.is_ascii(); + let ascii_only = substring_array.is_ascii() && string_array.is_ascii(); let string_iter = string_array.iter(); let substring_iter = substring_array.iter();