-
Notifications
You must be signed in to change notification settings - Fork 37
#455: Integrate SPARQL Functions #511
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
base: gh-pages
Are you sure you want to change the base?
Conversation
|
Do we want to have the SPARQL function sections being populated dynamically (from https://github.com/w3c/sparql-query/blob/main/sparql-ns.ttl ) or just updated on demand? |
|
I am afraid the proper process would be:
This is of course a lot of work but will be paying off on the long term because the info will be machine readable, e.g. for syntax-directed editors. BTW the diff is huge - what happened? |
I messed up the formatting.. will fix that next |
If contributed back to RDF & SPARQL WG, I'm sure that could get incorporated into sparql-ns. |
…ptions, categories, spec links.
- Introduced examples for various SPARQL functions to enhance documentation and usability. - Added a new prefix for shnex-sparql to categorize examples. - Updated existing functions with example usage, including arithmetic, logical, string, numeric, and date functions. - Ensured all aggregate functions also include example usage for clarity.
…ttl; fix isdefinedby URIs
…nd infix operator symbols. Add infix operators to selected functions
|
SPARQL functions work on arguments that are single RDF terms. In SPARQL Aggregates tied into the way shnex has it's own aggregates and that's probably the way to go - I think that defining an adaption layer to get SPARQL aggregates to work is not that different from shnex's aggregates so there is no advantage to SPARQL aggregates. shnex aggregates working on lists which integrates with the way shnex is e.g.
I don't see that node expressions can have variables other than the environment : #498 (comment) |
| shnex-sparql:infixOperator | ||
| a rdf:Property ; | ||
| rdfs:label "infix operator"@en ; | ||
| rdfs:comment "Indicates the infix operator symbol used in SPARQL syntax for this function, enabling conversion from functional form to infix notation."@en ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is infix used in node expressions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not but the information is useful to capture IMHO, to produce human-readable syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would also need infix precedence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would also need infix precedence.
which means? 🤔
|
s/second/seconds/ to reduce the ambiguity of "the second component of". |
|
@simonstey this will be a great contribution, but the PR has been in draft state and unchanged for several weeks. Do you need input/help to finish it? |
whoops, sry.. I'll have this PR merge-ready by next Monday! |
|
@HolgerKnublauch |
|
Thanks a lot, Simon! I have made mostly cosmetic updates to your branch, which are hopefully OK. We need to decide what to do with aggregates though. They are very different from the other functions as the don't work as in SPARQL: In a SPARQL query you would use them with a variable while in Node Expressions, the processing would work best if they receive another node expression that produces the aggregate values. This however does not match how the other functions here work, which receive only individual values as arguments, never a list of values. Also, the shnex namespace already contains aggregates. I suggest we delete the aggregates from our sparql: namespace. |
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
The classes sparql:Function etc are ill-defined and serve IMHO no purpose from a SHACL point of view. By replacing them with sh:ListParameterExpressionFunction we follow SHACL syntax and also make the owl:import to the external namespace unnecessary. (That owl:import does not resolve right now anyway)
…ke lists as parameters
These do not fit the execution model of node expressions. If people still want to use them, they can use SPARQL strings via sh:select etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me it's good enough for now. Further refinements can and will happen in fresh tickets, when needed.
Closes #455