You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid LIKE/ILIKE escape strings are silently accepted instead of rejected #7804
This silently mishandles invalid escape specifiers instead of returning an input error:
... LIKE 'x' ESCAPE '' → chars().next() yields None, so the predicate runs with no escape character.
... LIKE 'x' ESCAPE 'ab' → chars().next() yields 'a', silently truncating the two-character input to one.
Both change predicate behavior rather than rejecting bad input, which contradicts the project's "validate inputs and reject invalid values with descriptive errors at API boundaries — never silently clamp or adjust" guideline.
Expected: require exactly one character. Reject empty and multi-character escape strings with a descriptive error (matching the existing error for non-SingleQuotedString escape values just below).
Add tests covering ESCAPE '', ESCAPE 'ab', and the valid single-char case, for both LIKE and ILIKE.
Note: this is pre-existing behavior (unrelated to any DataFusion upgrade); surfaced by CodeRabbit review on #7793.
Activity
fix(sql): reject invalid LIKE/ILIKE escape strings (lance-format#7810)