()
| 188 | |
| 189 | #[test] |
| 190 | fn basic_array_rewrite() { |
| 191 | let rewritten = rewrite_arrow_distance( |
| 192 | "SELECT title FROM articles ORDER BY embedding <-> ARRAY[0.1, 0.2, 0.3] LIMIT 5", |
| 193 | ) |
| 194 | .unwrap(); |
| 195 | assert!( |
| 196 | rewritten.contains("vector_distance(embedding, ARRAY[0.1, 0.2, 0.3])"), |
| 197 | "got: {rewritten}" |
| 198 | ); |
| 199 | assert!(!rewritten.contains("<->")); |
| 200 | } |
| 201 | |
| 202 | #[test] |
| 203 | fn rewrite_with_param() { |
nothing calls this directly
no test coverage detected