Add a way to specify a preferred store which should be used for queries #439
+98
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is a prototype on how users can influence the data store chosen by Polypheny. At the moment it is only implemented for SQL queries and it operates on a table as a whole, this might very well be expanded to column level (hence why it is parsed as part of a compound identifier). The handling of the preference inside the router is still not optimal.
How to use
Let's assume we have a table orders that is placed on two stores with the unique names
p
andq
. The storep
is very fast andq
is slow. For an interactive request the programmer can have Polypheny use the fast store with query like this:But when running large scale analysis, where slower load times are acceptable, the query is routed to the slow store:
Testing
Place a table on two stores. Then query the table with the syntax above in the UI. In the routing tab on the left, it should show that the selected placement was used (or at least preferred when not all columns were present on the selected store).
Bugs
Any identifier can be annotated. No warnings or errors are given when this annotation has no effect.
No special error handling or warning when the placement does not exist.
Only implemented for the SimpleRouter so far. Should be fairly easy to extend
to the other routers as well.
Other placements are used if the preferred one does not have all the columns. (this might be a feature)