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

store: make comparisons case-insensitive #3191

Closed
wants to merge 1 commit into from
Closed

Conversation

saihaj
Copy link
Member

@saihaj saihaj commented Jan 26, 2022

Recreating #3126
Closes #3116

Copy link
Collaborator

@lutter lutter left a comment

Choose a reason for hiding this comment

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

I am totally fine with this change, but it is a breaking change in that the same query may now return different data.

@azf20 Are you ok with merging this?

@azf20
Copy link
Contributor

azf20 commented Feb 9, 2022

Nice! cc @That3Percent. I think this depends a bit on our apiVersioning story - this is quite a significant change in query behaviour, so I think a question is if we make this part of the first graphQL Version or not?

@That3Percent
Copy link
Contributor

Nice! cc @That3Percent. I think this depends a bit on our apiVersioning story - this is quite a significant change in query behaviour, so I think a question is if we make this part of the first graphQL Version or not?

This PR seems to have some problems.

For one, this will break existing dApps which were expecting the existing case-sensitive behavior. A better option I think would have been to add case-insensitive variants of these arguments, rather than to modify the existing ones.

Another concern comes quoted from the issue:

case-sensitivity is locale-dependent, and the response will depend on the locale in which the database is running, but that's not a new thing, we have that with ordering too.

Determinism is table-stakes. We must not introduce non-determinism, and we must eradicate the existing non-determinism. So, that part gets a hard no from me unless all queries using these features are errors unless the non-determinism flag is set in graph-node... which would break all the existing queries.

@azf20
Copy link
Contributor

azf20 commented Feb 23, 2022

Reasonable on breaking existing dapps - @lutter @saihaj @dotansimha what do you think about introducing a new i_contains, i_starts_with option in the where, to provide specific case insensitive behaviour? My instinct is that the case-sensitivity is not what most users would expect, but I can't think of an easy way to validate if dapps are relying on it.

We are addressing the database locale issue separately: #3118

@saihaj
Copy link
Member Author

saihaj commented Feb 23, 2022

@That3Percent agreed that this is a breaking change and to address it as discussed in the ticket we are adding strict filters #3117 so should we instead keep this as is and then and an insensitive filter?

@azf20
Copy link
Contributor

azf20 commented Feb 24, 2022

@saihaj it seems that we agree - let's keep this as is and introduce a case insensitive filter. We can then monitor usage to try and understand if users are relying on the sensitivity

@saihaj
Copy link
Member Author

saihaj commented Feb 26, 2022

@azf20 #3294

@saihaj saihaj closed this Feb 26, 2022
@saihaj saihaj deleted the saihaj/i3116 branch February 26, 2022 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change _contains _starts_with, _ends_with functionality to be case insensitive
4 participants