Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCOCOA-1874: Add support for lexicographical comparison for string queries #8557

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

dianaafanador3
Copy link
Contributor

@dianaafanador3 dianaafanador3 commented Apr 23, 2024

Added support for string comparison queries, which allows building string
queries with the following operators (>, >=, <, <=).
(#8008).

@dianaafanador3 dianaafanador3 marked this pull request as draft April 23, 2024 12:46
@cla-bot cla-bot bot added the cla: yes label Apr 23, 2024
@dianaafanador3 dianaafanador3 linked an issue Jun 26, 2024 that may be closed by this pull request
@dianaafanador3 dianaafanador3 force-pushed the dp/lexicographical_comparision_string_queries branch 2 times, most recently from ad12214 to 1fc78b2 Compare June 27, 2024 14:17
@dianaafanador3 dianaafanador3 force-pushed the dp/lexicographical_comparision_string_queries branch from 1fc78b2 to 4fd7d7a Compare July 25, 2024 17:28
@dianaafanador3 dianaafanador3 force-pushed the dp/lexicographical_comparision_string_queries branch from 4fd7d7a to 03b9db1 Compare July 25, 2024 17:30
@dianaafanador3 dianaafanador3 marked this pull request as ready for review July 25, 2024 17:30
Copy link
Contributor

@leemaguire leemaguire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tgoyne
Copy link
Member

tgoyne commented Aug 5, 2024

This is silently ignoring case-insensitive modifiers on comparison operators (e.g. a >[c] b).

You appear to have modified the generated test files directly rather than modify the template files.

@dianaafanador3
Copy link
Contributor Author

dianaafanador3 commented Aug 8, 2024

This is silently ignoring case-insensitive modifiers on comparison operators (e.g. a >[c] b).

You appear to have modified the generated test files directly rather than modify the template files.

Case sensitive operations are not supported for >, >=, <, <= operators in core, the only things is to throw an error if this modifiers is added when using a NSPredicate query, unless I'm missing something.
From my understanding, lexicographical comparison is already "case sensitive" because it takes into account the weight of the character (which is different for lower case and upper case characters), I don't think we can make case insensitive lexicographical comparison

@tgoyne
Copy link
Member

tgoyne commented Aug 8, 2024

I don't think we should support case-insensitive comparisons, but we need to report an error rather than silently doing the wrong thing.

@dianaafanador3 dianaafanador3 force-pushed the dp/lexicographical_comparision_string_queries branch from 03b9db1 to f1058b6 Compare August 13, 2024 08:40
@dianaafanador3
Copy link
Contributor Author

@tgoyne solved comments

@tgoyne tgoyne force-pushed the dp/lexicographical_comparision_string_queries branch from f1058b6 to c0b16f1 Compare August 19, 2024 20:07
@tgoyne tgoyne merged commit 9eeb64b into master Aug 19, 2024
127 of 133 checks passed
@tgoyne tgoyne deleted the dp/lexicographical_comparision_string_queries branch August 19, 2024 21:50
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filters on String
3 participants