alamb commented on code in PR #3306:
URL: https://github.com/apache/arrow-rs/pull/3306#discussion_r1044857822
##########
arrow-string/src/like.rs:
##########
@@ -1272,6 +1270,101 @@ mod tests {
vec![true, false, false, false]
);
+ // We only implement loose matching
Review Comment:
When I ran these tests without the changes in this PR I got a bunch of
failures. Is that expected?
```
failures:
---- like::tests::test_utf8_array_ilike_unicode stdout ----
thread 'like::tests::test_utf8_array_ilike_unicode' panicked at 'assertion
failed: `(left == right)`
left: `true`,
right: `false`: unexpected result when comparing FFkoß at position 0 to
FFkoSS ', arrow-string/src/like.rs:1279:5
stack backtrace:
0: rust_begin_unwind
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:218:23
3: core::panicking::assert_failed
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:181:5
4: arrow_string::like::tests::test_utf8_array_ilike_unicode
at ./src/like.rs:1279:5
5: arrow_string::like::tests::test_utf8_array_ilike_unicode::{{closure}}
at ./src/like.rs:917:13
6: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
7: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
---- like::tests::test_utf8_array_ilike_unicode_contains stdout ----
thread 'like::tests::test_utf8_array_ilike_unicode_contains' panicked at
'assertion failed: `(left == right)`
left: `true`,
right: `false`: unexpected result when comparing sdlkdfFkoßsdfs at position
0 to %FFkoSS% ', arrow-string/src/like.rs:1331:5
stack backtrace:
0: rust_begin_unwind
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:218:23
3: core::panicking::assert_failed
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:181:5
4: arrow_string::like::tests::test_utf8_array_ilike_unicode_contains
at ./src/like.rs:1331:5
5:
arrow_string::like::tests::test_utf8_array_ilike_unicode_contains::{{closure}}
at ./src/like.rs:917:13
6: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
7: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
---- like::tests::test_utf8_array_ilike_unicode_contains_dyn stdout ----
thread 'like::tests::test_utf8_array_ilike_unicode_contains_dyn' panicked at
'assertion failed: `(left == right)`
left: `true`,
right: `false`: unexpected result when comparing sdlkdfFkoßsdfs at position
0 to %FFkoSS% ', arrow-string/src/like.rs:1331:5
stack backtrace:
0: rust_begin_unwind
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:218:23
3: core::panicking::assert_failed
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:181:5
4: arrow_string::like::tests::test_utf8_array_ilike_unicode_contains_dyn
at ./src/like.rs:1331:5
5:
arrow_string::like::tests::test_utf8_array_ilike_unicode_contains_dyn::{{closure}}
at ./src/like.rs:917:13
6: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
7: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
---- like::tests::test_utf8_array_ilike_unicode_dyn stdout ----
thread 'like::tests::test_utf8_array_ilike_unicode_dyn' panicked at
'assertion failed: `(left == right)`
left: `true`,
right: `false`: unexpected result when comparing FFkoß at position 0 to
FFkoSS ', arrow-string/src/like.rs:1279:5
stack backtrace:
0: rust_begin_unwind
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:218:23
3: core::panicking::assert_failed
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:181:5
4: arrow_string::like::tests::test_utf8_array_ilike_unicode_dyn
at ./src/like.rs:1279:5
5:
arrow_string::like::tests::test_utf8_array_ilike_unicode_dyn::{{closure}}
at ./src/like.rs:917:13
6: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
7: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
---- like::tests::test_utf8_array_ilike_unicode_ends stdout ----
thread 'like::tests::test_utf8_array_ilike_unicode_ends' panicked at
'assertion failed: `(left == right)`
left: `true`,
right: `false`: unexpected result when comparing sdlkdfFFkoß at position 0
to %FFkoSS ', arrow-string/src/like.rs:1311:5
stack backtrace:
0: rust_begin_unwind
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:218:23
3: core::panicking::assert_failed
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:181:5
4: arrow_string::like::tests::test_utf8_array_ilike_unicode_ends
at ./src/like.rs:924:21
5:
arrow_string::like::tests::test_utf8_array_ilike_unicode_ends::{{closure}}
at ./src/like.rs:917:13
6: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
7: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
---- like::tests::test_utf8_array_ilike_unicode_ends_dyn stdout ----
thread 'like::tests::test_utf8_array_ilike_unicode_ends_dyn' panicked at
'assertion failed: `(left == right)`
left: `true`,
right: `false`: unexpected result when comparing sdlkdfFFkoß at position 0
to %FFkoSS ', arrow-string/src/like.rs:1311:5
stack backtrace:
0: rust_begin_unwind
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:218:23
3: core::panicking::assert_failed
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:181:5
4: arrow_string::like::tests::test_utf8_array_ilike_unicode_ends_dyn
at ./src/like.rs:924:21
5:
arrow_string::like::tests::test_utf8_array_ilike_unicode_ends_dyn::{{closure}}
at ./src/like.rs:917:13
6: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
7: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
---- like::tests::test_utf8_array_ilike_unicode_starts stdout ----
thread 'like::tests::test_utf8_array_ilike_unicode_starts' panicked at
'assertion failed: `(left == right)`
left: `true`,
right: `false`: unexpected result when comparing FFkoßsdlkdf at position 0
to FFkoSS% ', arrow-string/src/like.rs:1291:5
stack backtrace:
0: rust_begin_unwind
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:218:23
3: core::panicking::assert_failed
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:181:5
4: arrow_string::like::tests::test_utf8_array_ilike_unicode_starts
at ./src/like.rs:1291:5
5:
arrow_string::like::tests::test_utf8_array_ilike_unicode_starts::{{closure}}
at ./src/like.rs:917:13
6: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
7: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
---- like::tests::test_utf8_array_ilike_unicode_start_dyn stdout ----
thread 'like::tests::test_utf8_array_ilike_unicode_start_dyn' panicked at
'assertion failed: `(left == right)`
left: `true`,
right: `false`: unexpected result when comparing FFkoßsdlkdf at position 0
to FFkoSS% ', arrow-string/src/like.rs:1291:5
stack backtrace:
0: rust_begin_unwind
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:218:23
3: core::panicking::assert_failed
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:181:5
4: arrow_string::like::tests::test_utf8_array_ilike_unicode_start_dyn
at ./src/like.rs:1291:5
5:
arrow_string::like::tests::test_utf8_array_ilike_unicode_start_dyn::{{closure}}
at ./src/like.rs:917:13
6: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
7: core::ops::function::FnOnce::call_once
at
/rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose
backtrace.
failures:
like::tests::test_utf8_array_ilike_unicode
like::tests::test_utf8_array_ilike_unicode_contains
like::tests::test_utf8_array_ilike_unicode_contains_dyn
like::tests::test_utf8_array_ilike_unicode_dyn
like::tests::test_utf8_array_ilike_unicode_ends
like::tests::test_utf8_array_ilike_unicode_ends_dyn
like::tests::test_utf8_array_ilike_unicode_start_dyn
like::tests::test_utf8_array_ilike_unicode_starts
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]