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

Support substring comparisons on list elements #393

Closed
merkys opened this issue Dec 6, 2021 · 1 comment · Fixed by #415
Closed

Support substring comparisons on list elements #393

merkys opened this issue Dec 6, 2021 · 1 comment · Fixed by #415
Assignees
Labels
priority/low There is a consensus that this have low priority to sort out. topic/filtering-language Issue discussing changes and improvements to the query and filtering language type/proposal Proposal for addition/removal of features. May need broad discussion to reach consensus.
Milestone

Comments

@merkys
Copy link
Member

merkys commented Dec 6, 2021

While discussing #368 with @JPBergsma I noticed that comparisons on list properties having string elements can only use numeric comparison operators. This means, for example, that the following query is not allowed even on filter language grammar level:

species_at_sites HAS STARTS WITH "Si"

Since as of v1.1.0 there are not much of list properties with string elements, the issue is minor. However, such properties may arise in the future, thus I propose extending the grammar to allow such constructs.

Fix seems rather simple: replace

ValueList = [ Operator ], Value, { Comma, [ Operator ], Value } ;

with

ValueList = ( [ Operator ], Value | FuzzyStringOpRhs ), { Comma, ( [ Operator ], Value | FuzzyStringOpRhs ) } ;

(Similarly adjust ValueZip and SetOpRhs as well). I have not tried this for real, thus have not checked for grammar conflicts.

Pinging people usually involved in developing the filter language: @sauliusg, @rartino and @fekad.

@merkys merkys added topic/filtering-language Issue discussing changes and improvements to the query and filtering language type/proposal Proposal for addition/removal of features. May need broad discussion to reach consensus. priority/low There is a consensus that this have low priority to sort out. labels Dec 6, 2021
@merkys
Copy link
Member Author

merkys commented Jun 2, 2022

@giovannipizzi and @gmrigna has encountered this recently while investigating means to implement biomolecule support (#389).

@merkys merkys self-assigned this Jun 2, 2022
@merkys merkys added this to the v1.2 milestone Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/low There is a consensus that this have low priority to sort out. topic/filtering-language Issue discussing changes and improvements to the query and filtering language type/proposal Proposal for addition/removal of features. May need broad discussion to reach consensus.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant