-
Notifications
You must be signed in to change notification settings - Fork 12
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
Counting, filtering and additional features #123
Comments
👍 as I understand they work as estimates so possibly method name should reflect it eg.
👍 feature detection, in current spec I think we have
We could maybe stay more specific about errors and some features could get detected by try {
// use source-filters
} catch (err) {
// err - source-filters not supported ?
} |
@elf-pavlik yes to |
@l00mi I don't think these would belong to the high level API. Quoting #87
These issues do not build upon other primitives. They provide additional - and in my case fundamental, particularly when talking about count estimates - primitives upon which to build. I will put some time into researching the state of the high level API (I haven't had the time to track that so far) and comment in the other issue. |
Hmm, I see your point. Then again one of the main points of the low-level api is as stated to create:
This origins from the idea that it should be easy to integrate this minimal spec to make libraries interoperable (full stop for the low-level API). Adding more primitives can make this to steep to adapt (or follow in case of new) libraries. We might discuss again about "optional" methods (like a guideline)? Then again this kinda of renders a spec obsolete. I guess the high-level API can extend the low-level API @bergos, @RubenVerborgh ? For another Issue: Also we might start do define different levels of API interoperability. minimal, basic, comfort ? But this might make stuff to complex? |
@l00mi I understand your point, as well. I think one way to strike a good balance would be through the semantic difference between a For filtering, perhaps the spec could be extended to |
A semi-working basic implementation of filtering in quadstore: https://github.com/beautifulinteractions/node-quadstore/blob/8961b4656994a9eccd7cb16bf621afb3483d3156/test/rdfstore.prototype.match.js#L202-L204 . Still very much WIP. |
@RubenVerborgh has already done some work related to this with TPF: https://ruben.verborgh.org/publications/vanherwegen_iswc_2015/ |
Closed based on the resolution in #136 |
Small premise... Although these are three different issues, they are highly correlated and I would expect the conversation around them to easily go from one to the other. Hence why I've decided to group them together.
Counting (Source interface)
At the moment there is no standardized way to anticipate how many quads would be returned by any given
.match()
invocation. This is particularly troublesome for query planning. What about a.count(subject, predicate, object, graph)
method?Filtering (Source interface)
Particularly when dealing with timeseries and highly selective filters on large datasets, having to filter quads in-memory can lead to significant waste of resources. To implement more advanced filtering whilst maintaining API compat. with the current
.match()
implementation, something like this could work:.match(<NamedNode>, <NamedNode>, [ {lt: <Literal>, gt: <Literal>} ])
The basic idea is to allow implementors to optionally pass arrays of filters instead of
Term
s orRegExp
s.Custom features
Not everything can be standardized. Any feature that is relevant to only a few use cases, such as the advanced filtering mentioned above, might not be everyone's cup of tea. However, it would be nice to have a standardized way to advertise such features, so that other components using
RDF/JS
interfaces would be able to make use of these non-standard features when possible while normally defaulting to standard expectations. Something like the following could work:source.supportedFeatures = ['source-filters']
The text was updated successfully, but these errors were encountered: