Rewrite all occurrences of `expr <-> expr` to `vector_distance(expr, expr)`. Handles: `column_name <-> ARRAY[...]`, `column <-> $param`, etc. Returns `None` if no valid `<->` patterns are found outside string literals, quoted identifiers, or comments.
(sql: &str)
| 11 | /// Returns `None` if no valid `<->` patterns are found outside string |
| 12 | /// literals, quoted identifiers, or comments. |
| 13 | pub(super) fn rewrite_arrow_distance(sql: &str) -> Option<String> { |
| 14 | rewrite_binary_op(sql, "<->", "vector_distance") |
| 15 | } |
| 16 | |
| 17 | /// Extract the left operand before `<->`: a column name or dotted path. |
| 18 | fn extract_left_operand(before: &str) -> Option<String> { |