You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/06/23 20:29:34 UTC
[GitHub] [superset] john-bodley opened a new pull request, #24506: fix: Native filter dynamic numeric search
john-bodley opened a new pull request, #24506:
URL: https://github.com/apache/superset/pull/24506
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
Addresses an issue with https://github.com/apache/superset/pull/24418 with handling `LIKE` vs. `ILIKE`.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
CI.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] john-bodley commented on a diff in pull request #24506: fix: Native filter dynamic numeric search
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #24506:
URL: https://github.com/apache/superset/pull/24506#discussion_r1240349126
##########
superset/models/helpers.py:
##########
@@ -1852,13 +1852,13 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma
elif op == utils.FilterOperator.LESS_THAN_OR_EQUALS.value:
where_clause_and.append(sqla_col <= eq)
elif op in {
- utils.FilterOperator.ILIKE,
- utils.FilterOperator.LIKE,
+ utils.FilterOperator.ILIKE.value,
+ utils.FilterOperator.LIKE.value,
}:
if target_generic_type != GenericDataType.STRING:
sqla_col = sa.cast(sqla_col, sa.String)
- if utils.FilterOperator.LIKE.value:
+ if op == utils.FilterOperator.LIKE.value:
Review Comment:
Oops. Previously both `LIKE` and `ILIKE` were being materialized as `LIKE`.
##########
superset/models/helpers.py:
##########
@@ -1852,13 +1852,13 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma
elif op == utils.FilterOperator.LESS_THAN_OR_EQUALS.value:
where_clause_and.append(sqla_col <= eq)
elif op in {
- utils.FilterOperator.ILIKE,
- utils.FilterOperator.LIKE,
+ utils.FilterOperator.ILIKE.value,
Review Comment:
The "value" option is not required but I added this for consistency.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #24506: fix: Native filter dynamic numeric search
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24506:
URL: https://github.com/apache/superset/pull/24506#issuecomment-1604921540
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24506?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#24506](https://app.codecov.io/gh/apache/superset/pull/24506?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (bb2904f) into [master](https://app.codecov.io/gh/apache/superset/commit/e6f7c73f543ea5c2e5ffdab8e9e01ec87fd94322?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (e6f7c73) will **decrease** coverage by `11.01%`.
> The diff coverage is `0.00%`.
> :exclamation: Current head bb2904f differs from pull request most recent head 6df1ead. Consider uploading reports for the commit 6df1ead to get more accurate results
```diff
@@ Coverage Diff @@
## master #24506 +/- ##
===========================================
- Coverage 69.06% 58.06% -11.01%
===========================================
Files 1901 1901
Lines 74019 74019
Branches 8116 8116
===========================================
- Hits 51121 42977 -8144
- Misses 20787 28931 +8144
Partials 2111 2111
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `53.79% <0.00%> (ø)` | |
| python | `60.59% <0.00%> (-22.90%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `54.65% <0.00%> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://app.codecov.io/gh/apache/superset/pull/24506?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [superset/models/helpers.py](https://app.codecov.io/gh/apache/superset/pull/24506?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbW9kZWxzL2hlbHBlcnMucHk=) | `62.82% <0.00%> (-8.14%)` | :arrow_down: |
... and [300 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24506/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] john-bodley merged pull request #24506: fix: Native filter dynamic numeric search
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley merged PR #24506:
URL: https://github.com/apache/superset/pull/24506
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org