-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[dagster-airlift][datasets 3/3] dataset filtering #29164
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
base: dpeng817/dataset_assets
Are you sure you want to change the base?
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
da21f73
to
63fbddc
Compare
3c88083
to
3812316
Compare
if ( | ||
retrieval_filter.dataset_uri_ilike | ||
and retrieval_filter.dataset_uri_ilike not in dataset.uri | ||
): |
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.
The current implementation checks for substring presence with retrieval_filter.dataset_uri_ilike not in dataset.uri
, which doesn't accurately simulate SQL's ILIKE operator behavior. For better fidelity with the real implementation, consider using case-insensitive pattern matching (e.g., with regex) or at minimum a case-insensitive substring check. This would more closely match how ILIKE works in the actual SQL queries used by the production code.
if ( | |
retrieval_filter.dataset_uri_ilike | |
and retrieval_filter.dataset_uri_ilike not in dataset.uri | |
): | |
if ( | |
retrieval_filter.dataset_uri_ilike | |
and retrieval_filter.dataset_uri_ilike.lower() not in dataset.uri.lower() | |
): |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
) -> Sequence["Dataset"]: | ||
params: dict[str, Any] = {"limit": limit, "offset": offset} | ||
if retrieval_filter.dataset_uri_ilike: | ||
params["uri_pattern"] = retrieval_filter.dataset_uri_ilike |
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.
would prefer to match the python name to the REST API name, e.g. just rename dataset_uri_ilike
to dataset_uri_pattern
.
63fbddc
to
339f24e
Compare
3812316
to
28ea70e
Compare
339f24e
to
de133c2
Compare
ae9608c
to
730f322
Compare
de133c2
to
d67e1e0
Compare
730f322
to
ccef52b
Compare
d67e1e0
to
2b29b96
Compare
ccef52b
to
fb6bb06
Compare
Summary & Motivation
Adds filtering properties for datasets.
How I Tested These Changes
Additional tests.
Changelog