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

Case sensitivity in LanguageFeature type #146

Open
mbtaylor opened this issue Jul 4, 2023 · 1 comment
Open

Case sensitivity in LanguageFeature type #146

mbtaylor opened this issue Jul 4, 2023 · 1 comment

Comments

@mbtaylor
Copy link
Contributor

mbtaylor commented Jul 4, 2023

Language Features currently need canonical capitalisation of the feature type in order to be recognised, for instance if I create a feature like this:

new LanguageFeature(""ivo://ivoa.net/std/TAPRegExt#features-adqlgeo", "CIRCLE")

it is recognised by VOLLT as referring to the standard CIRCLE geometry function, but if I do it like this:

new LanguageFeature("ivo://ivoa.net/std/tapregext#features-adqlgeo", "CIRCLE")

it's not.

This isn't strictly speaking a bug, but it goes against the rule from the IVOID 2.0 specification section 2.1:

The Registry references are, as a whole, compared case-insensitively, and must be treated case-insensitively throughout to maintain backwards compatibility with version 1 of this specification. When comparing full IVOIDs, the local part must be split off and compared preserving case, while the registry part must be compared case-insensitively.

I think this could be fixed by just modifying the (already overridden) equals and hashcode methods in adql.parsers.feature.LanguageFeature to work with case-folded values of type.

I'm happy to write a PR on request, but I don't know whether it could cause subtle unwanted effects elsewhere.

mbtaylor added a commit to mbtaylor/vollt that referenced this issue Jul 4, 2023
See gmantele#146.  The registry part of the IVOID should be assessed
case-insensitively according to section 2.1 of the IVOID standard
(https://www.ivoa.net/documents/IVOAIdentifiers/).
@mbtaylor
Copy link
Contributor Author

mbtaylor commented Jul 4, 2023

I made a PR in case it's helpful #147. But feel free to discard it if there's some reason why this is not a good idea.

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

No branches or pull requests

1 participant