Skip to content
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 18 commits into from
Oct 17, 2024
Merged

Inequality table integration #252

merged 18 commits into from
Oct 17, 2024

Conversation

ceesem
Copy link
Collaborator

@ceesem ceesem commented Oct 17, 2024

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 like client.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.

ceesem and others added 18 commits October 11, 2024 12:21
* 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
return is_list_like(x) and not isinstance(x, dict)


def is_lessthan(x):
Copy link
Collaborator

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.

@fcollman fcollman merged commit 52a8fdf into master Oct 17, 2024
16 checks passed
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants