-
Notifications
You must be signed in to change notification settings - Fork 560
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 day, month and year function for date #1154
Conversation
According to the SPARQL 1.1 Specification (https://www.w3.org/TR/sparql11-query/#func-date-time) the builtin functions are only defined on |
@white-gecko I am no expert on the specs, I searched through it and could not find any specification on what to do if the argument is of the wrong type ( If you would be interested in merging this I would look into supporting the other types as well and update this MR. Note: |
I have seen it in different implementations that only
or
|
@white-gecko to be honest i have developed a dislike for switches in software as they complicate code and testing as resulting combinations do increase exponentially. So if it does not clash with the specs I prefer to not have a switch. I would really like to simplify the code base for sparql evaluation a bit - I am running with a few local changes which gave my use case 25% performance boost - and I would like to work on it a bit more, as it is still to slow for my use case. Those where really low hanging fruit and I am sure there is more. Introducing a switch means supporting more different combinations - and probably breaking those, making it harder to move the code forward. See #1155 for an example of this - my local refactoring broke the semantic of comparing a |
In an informative section the standard says.
Based on this I can not judge if we should support the additional types or not. Your argument that it might be supported in SPARQL 1.2 sounds good to me. Anyhow I ask @ashleysommer and @nicholascar for their opinion. |
That sounds great! I've had a mental note for months to go in to see where SPARQL could be made faster in RDFLib. |
e0be964
to
7c1d49b
Compare
Official reviews from me and @white-gecko needed, a re-review from @ashleysommer please! |
I've resolved the incidental questions, since they have answers.
I personally use So I approve this PR even if it is extending beyond the SPARQL 1.1 spec! |
Fixes #1153
Proposed Changes