-
Notifications
You must be signed in to change notification settings - Fork 0
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
Queryable and Filterable typings #7
Conversation
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.
Just minor comments and open questions
Should we vote with the thumbs-up emoji on everything we agree with and comment on everything we don't? |
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.
I think it would be useful to have a (no-op) example implementation and an example usage – particularly to clarify whether the typings really help with writing and reading code.
Happy to work something up if you agree.
The conversation has been silent for a while, I assume there are no inbound comments and suggestions for the time being. I'll do a first round of edits based on the above. |
…, unifies cost and order types across Filterable and Queryable, drops dependency on sparqljsalgebra
Another round of updates done based on all the suggestions in this thread. I'm resolving issues as I go but feel free to reopen if needed. |
… promisifies their return type
…eResult#execute()
Should we merge this into |
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.
Apologies for the long delay.
Just some minor things I noticed when going over everything in detail.
Won't the fact that we have two distinct things (the query string, and the query future) that are both named "query" be too confusing then?
I actually like it when that happens 😄 Makes the code more universal, as it can be explained in terms of language-independent patterns that are known by many people, and are extensively documented. I'm not married to "Future", definitely open to alternatives, but AFAICS it's the best name we have at the moment. |
Good point. If we ever switched to what I proposed, that argument would definitely need to be renamed to something like
Aha, it's nice to disagree every now and then. Disagreement is where learning happens. My preference goes for naming schemes that try to stay close to how I would state something while discussing at a coffee machine. I think that makes for code that is easier to understand, although it might be harder to write or model initially. I don't think it's a purely personal thing but I am also not sure that it isn't. I interpret the idea of universality you mention as code that is more effective at describing how it does something than at describing what it does. EDIT: not worthy of another comment but relevant to the discussion is the fact that a naming scheme that matches the paradigm (i.e. that expresses both the what and the how) makes it harder to support both promises and callbacks while keeping the same interfaces. To me that's an instinctive red flag about violating some sort of orthogonality principle. Coming back to earth, I'm ok with keeping the naming as-is if that's where we stand collectively. Thank you for the lovely exchange! |
Co-authored-by: Ruben Taelman <[email protected]>
No. Per my previous comment, it's natural to me that "query" means both the query string/algebra, and the query future. The I don't like the latter being called "result", because it definitely isn't one. Personally I prefer to keep the naming short, so while I don't have a problem with the explicit referencing of the "future" pattern, I don't think it's necessary. |
Indeed, it's a "future to a query result".
Me too, as long as it is sufficiently descriptive. So the options seem to be:
My personal preference is option 1, even though it is longer. But I'm open to option 2 if the consensus lands there. But I'm definitely against option 3. |
All right, seems we have a consensus on option 2. |
There'a long conversation happening within the comments to #7 (comment) that has led us to realize the following issue:
Basically, We opted to drop Personal note: as an engine might go through multiple attempts at iteratively simplifying queries until it gets to a query that is supported by the underlying store (particularly in the case of |
…ueries / expressions
…ing generics to declare support for specific result types
@rubensworks @gsvarovsky there are no pending / unaddressed comments ATM! The only thing I have not addressed in the spec, although we have commented upon it but then forgotten about it, is where to put
Objections? Other than the above, I think we should merge this and then continue the conversation in dedicated issues. |
We already have them in
Sounds good! |
Haha, I am an idiot. +1 |
@gsvarovsky, @rubensworks and I have been bouncing ideas for a little while about a new RDF/JS specification aimed at standardizing the API of query engines willing to adopt the RDF/JS specs.
This PR aims to extend the conversation to the entire RDF/JS group, using what we have produced so far as a starting point for further discussion, changes and improvements.
On top of the work done on our respective projects, the proposed spec is also informed by the preliminary feedback we have received in #5. Thanks to all who pitched in!