-
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
Inequality table integration #252
Merged
Merged
+270
−15
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* refactor * remove pcg chunkedgraph (#224) * remove factory (#226) * remove factory (#225) * Remove JSONService and L2CacheClient factories (#227) * remove factory * remove factory * remove client mappings * remove more * Remove MaterializationClient factory (#229) * remove factory * possible smarter versioning * attempt tables merge * attempt views merge * refactor live_live_query
* many doc refactors * fix formatting * add node to changelog * add a date * minor fixes
* more small fixes * formatting
kebwi
reviewed
Oct 17, 2024
return is_list_like(x) and not isinstance(x, dict) | ||
|
||
|
||
def is_lessthan(x): |
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.
For consistency, I'll point out that I named the four inequalities "less", "greater", "less_equal", and "greater_equal" in my recent related work...but it isn't too important.
kebwi
added a commit
that referenced
this pull request
Oct 23, 2024
* first take before testing * Added materialization version endpoint check to query entry functions. * ruff/lint corrections. * remove unused dicts * Bump version: 5.30.2 → 5.31.0 * Remove factory syntax for subclients (#222) * refactor * remove pcg chunkedgraph (#224) * remove factory (#226) * remove factory (#225) * Remove JSONService and L2CacheClient factories (#227) * remove factory * remove factory * remove client mappings * remove more * Remove MaterializationClient factory (#229) * remove factory * possible smarter versioning * attempt tables merge * attempt views merge * refactor live_live_query * Redo docs to acomodate factory refactor (#247) * many doc refactors * fix formatting * add node to changelog * add a date * minor fixes * Small doc fixes (#248) * more small fixes * formatting * Bump version: 5.31.0 → 6.0.0 * initial table manager * tweak bool compares * validation check on inequalities * update docs * add simple properties to class * fix unintentional file changes with rebase * fix dangling doc * do what ruff tells me to do --------- Co-authored-by: Keith Wiley <keith.wiley@alleninstitute.org> Co-authored-by: Ben Pedigo <benjamindpedigo@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kebwi
added a commit
that referenced
this pull request
Oct 23, 2024
* first take before testing * Added materialization version endpoint check to query entry functions. * ruff/lint corrections. * remove unused dicts * Bump version: 5.30.2 → 5.31.0 * Remove factory syntax for subclients (#222) * refactor * remove pcg chunkedgraph (#224) * remove factory (#226) * remove factory (#225) * Remove JSONService and L2CacheClient factories (#227) * remove factory * remove factory * remove client mappings * remove more * Remove MaterializationClient factory (#229) * remove factory * possible smarter versioning * attempt tables merge * attempt views merge * refactor live_live_query * Redo docs to acomodate factory refactor (#247) * many doc refactors * fix formatting * add node to changelog * add a date * minor fixes * Small doc fixes (#248) * more small fixes * formatting * Bump version: 5.31.0 → 6.0.0 * initial table manager * tweak bool compares * validation check on inequalities * update docs * add simple properties to class * fix unintentional file changes with rebase * fix dangling doc * do what ruff tells me to do --------- Co-authored-by: Keith Wiley <keith.wiley@alleninstitute.org> Co-authored-by: Ben Pedigo <benjamindpedigo@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adding the inequalities to the
tables
interface.Inequalities are implicitly used by setting a value to a dictionary with a key as the inequality symbol and the value as the comparison. Multiple inequalities can be used for the same value to create range queries. Tables will enforce that inequalities only apply to float and integer columns and return an error if this is not done correctly. One small issue is that views use "integer" to specify root ids, so while tables disallow inequalities for root ids, views allow them.
In addition, this adds a small quality of life feature where if no filter is set, you can omit the
()
on the table name part. E.g., now something likeclient.materialize.tables.nucleus_detection_v0.query()
will just work. You can also see what fields are present with.fields
, which are spatial bounding boxes with.spatial_fields
and which allow numeric inequalities with.numeric_fields
.Documentation was added for these features.