You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/08 10:48:38 UTC
[GitHub] [superset] villebro opened a new pull request #12350: fix(explore): improve filter translation
villebro opened a new pull request #12350:
URL: https://github.com/apache/superset/pull/12350
### SUMMARY
Currently simple filters aren't always translated to valid custom SQL:
- strings aren't enclosed in quotes
- single quotes aren't doubly quotes as per ANSI SQL (`it's a word` -> `col = 'it''s a word'`)
- when only a subject or subject and operator are given, the custom filter is left empty
Some test cases are added and code slightly refactored.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TEST PLAN
New tests added and old tests updated accordingly. The variables in the tests are replaced with explicit values to make them easier to read.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [x] Has associated issue: closes #12340
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] 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.
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-io commented on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `3.50%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 63.54% -3.51%
==========================================
Files 1001 485 -516
Lines 49380 29871 -19509
Branches 5033 0 -5033
==========================================
- Hits 33112 18983 -14129
+ Misses 16140 10888 -5252
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.54% <ø> (-0.65%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.56% <0.00%> (-12.78%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `82.45% <0.00%> (-3.51%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
| ... and [526 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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] villebro commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553874900
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
+ Array.isArray(comparator)
+ ? comparator
+ : [comparator];
+ const isString =
+ firstValue !== undefined && Number.isNaN(Number(firstValue));
+ const quote = isString ? "'" : '';
+ const [prefix, suffix] = isMulti ? ['(', ')'] : ['', ''];
+ const formattedComparators = (comparatorArray || []).map(
+ val => `${quote}${isString ? val.replace("'", "''") : val}${quote}`,
+ );
+ if (comparatorArray) {
+ expression += ` ${prefix}${formattedComparators.join(', ')}${suffix}`;
Review comment:
This isn't super easy to read (apologies), but the unit tests should be easier to reason about.
----------------------------------------------------------------
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.
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] kgabryje commented on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
kgabryje commented on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756702450
LGTM
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `3.01%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 64.04% -3.02%
==========================================
Files 1001 485 -516
Lines 49380 29886 -19494
Branches 5033 0 -5033
==========================================
- Hits 33112 19140 -13972
+ Misses 16140 10746 -5394
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `64.04% <ø> (-0.16%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `74.67% <0.00%> (-8.66%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.58% <0.00%> (-0.28%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `91.37% <0.00%> (-0.14%)` | :arrow_down: |
| [...rset-frontend/src/setup/setupErrorMessagesExtra.ts](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRXJyb3JNZXNzYWdlc0V4dHJhLnRz) | | |
| [...set-frontend/src/explore/actions/exploreActions.ts](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvYWN0aW9ucy9leHBsb3JlQWN0aW9ucy50cw==) | | |
| [...et-frontend/src/dashboard/components/SaveModal.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NhdmVNb2RhbC50c3g=) | | |
| [...erset-frontend/src/common/components/Tabs/index.ts](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9jb21wb25lbnRzL1RhYnMvaW5kZXgudHM=) | | |
| [...src/components/FilterableTable/FilterableTable.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRmlsdGVyYWJsZVRhYmxlL0ZpbHRlcmFibGVUYWJsZS50c3g=) | | |
| ... and [509 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
----------------------------------------------------------------
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.
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] villebro commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553874514
##########
File path: superset-frontend/src/explore/AdhocFilter.js
##########
@@ -48,22 +48,13 @@ const OPERATORS_TO_SQL = {
};
function translateToSql(adhocMetric, { useSimple } = {}) {
- if (
- (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE &&
- adhocMetric.comparator &&
- adhocMetric.operator) ||
- useSimple
- ) {
- const isMulti = MULTI_OPERATORS.has(adhocMetric.operator);
- const { subject } = adhocMetric;
+ if (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE || useSimple) {
+ const { subject, comparator } = adhocMetric;
const operator =
adhocMetric.operator && CUSTOM_OPERATORS.has(adhocMetric.operator)
? OPERATORS_TO_SQL[adhocMetric.operator](adhocMetric)
: OPERATORS_TO_SQL[adhocMetric.operator];
- const comparator = Array.isArray(adhocMetric.comparator)
- ? adhocMetric.comparator.join("','")
- : adhocMetric.comparator || '';
- return getSimpleSQLExpression(subject, operator, comparator, isMulti);
+ return getSimpleSQLExpression(subject, operator, comparator);
Review comment:
`isMulti` logic was moved inside the utility function
----------------------------------------------------------------
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.
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] kgabryje commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553879514
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
+ Array.isArray(comparator)
+ ? comparator
+ : [comparator];
+ const isString =
+ firstValue !== undefined && Number.isNaN(Number(firstValue));
Review comment:
Can we replace it with `typeof firstValue === 'string'`?
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
Review comment:
What do you think about setting `comparatorArray` as an empty array if `comparator` is null or undefined? Then we wouldn't need `comparatorArray || []` in line 330
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
+ Array.isArray(comparator)
+ ? comparator
+ : [comparator];
+ const isString =
+ firstValue !== undefined && Number.isNaN(Number(firstValue));
Review comment:
Ah, but that wouldn't handle cases like `"1"`. Nevermind 🙂
----------------------------------------------------------------
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.
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-io commented on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `3.50%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 63.54% -3.51%
==========================================
Files 1001 485 -516
Lines 49380 29871 -19509
Branches 5033 0 -5033
==========================================
- Hits 33112 18983 -14129
+ Misses 16140 10888 -5252
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.54% <ø> (-0.65%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.56% <0.00%> (-12.78%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `82.45% <0.00%> (-3.51%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
| ... and [526 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (5418eff) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `15.86%`.
> The diff coverage is `94.44%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
===========================================
- Coverage 67.05% 51.19% -15.87%
===========================================
Files 1001 473 -528
Lines 49380 16869 -32511
Branches 5033 4330 -703
===========================================
- Hits 33112 8636 -24476
+ Misses 16140 8233 -7907
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `51.19% <94.44%> (-0.05%)` | :arrow_down: |
| javascript | `?` | |
| python | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/explore/exploreUtils.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvZXhwbG9yZVV0aWxzLmpz) | `58.68% <93.33%> (-10.11%)` | :arrow_down: |
| [superset-frontend/src/explore/AdhocFilter.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQWRob2NGaWx0ZXIuanM=) | `56.06% <100.00%> (-41.24%)` | :arrow_down: |
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvYWxlcnQvRXhlY3V0aW9uTG9nLnRzeA==) | `11.76% <0.00%> (-88.24%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [superset-frontend/src/components/IconTooltip.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvSWNvblRvb2x0aXAudHN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| ... and [867 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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] kgabryje commented on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
kgabryje commented on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756702450
LGTM
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `3.06%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 63.99% -3.07%
==========================================
Files 1001 485 -516
Lines 49380 29871 -19509
Branches 5033 0 -5033
==========================================
- Hits 33112 19115 -13997
+ Misses 16140 10756 -5384
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.99% <ø> (-0.21%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `74.67% <0.00%> (-8.66%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/result\_set.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
| [superset/views/base\_api.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.68% <0.00%> (-0.47%)` | :arrow_down: |
| [superset/reports/notifications/base.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVwb3J0cy9ub3RpZmljYXRpb25zL2Jhc2UucHk=) | `95.00% <0.00%> (-0.46%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `91.09% <0.00%> (-0.41%)` | :arrow_down: |
| ... and [521 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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] villebro commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553883515
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
+ Array.isArray(comparator)
+ ? comparator
+ : [comparator];
+ const isString =
+ firstValue !== undefined && Number.isNaN(Number(firstValue));
Review comment:
I originally did, but then it hit me that numeric comparators are in fact strings if entered manually, hence need to be cast first.
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (5418eff) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `16.24%`.
> The diff coverage is `94.44%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
===========================================
- Coverage 67.05% 50.81% -16.25%
===========================================
Files 1001 473 -528
Lines 49380 16869 -32511
Branches 5033 4330 -703
===========================================
- Hits 33112 8572 -24540
+ Misses 16140 8297 -7843
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `50.81% <94.44%> (-0.43%)` | :arrow_down: |
| javascript | `?` | |
| python | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/explore/exploreUtils.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvZXhwbG9yZVV0aWxzLmpz) | `58.68% <93.33%> (-10.11%)` | :arrow_down: |
| [superset-frontend/src/explore/AdhocFilter.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQWRob2NGaWx0ZXIuanM=) | `56.06% <100.00%> (-41.24%)` | :arrow_down: |
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvYWxlcnQvRXhlY3V0aW9uTG9nLnRzeA==) | `11.76% <0.00%> (-88.24%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [superset-frontend/src/components/IconTooltip.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvSWNvblRvb2x0aXAudHN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| ... and [867 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `3.03%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 64.01% -3.04%
==========================================
Files 1001 485 -516
Lines 49380 29886 -19494
Branches 5033 0 -5033
==========================================
- Hits 33112 19132 -13980
+ Misses 16140 10754 -5386
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `64.01% <ø> (-0.19%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `74.67% <0.00%> (-8.66%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/result\_set.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `91.11% <0.00%> (-0.40%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.58% <0.00%> (-0.28%)` | :arrow_down: |
| [...ontend/src/dashboard/components/dnd/DragHandle.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9EcmFnSGFuZGxlLmpzeA==) | | |
| [superset-frontend/src/components/Menu/NewMenu.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9OZXdNZW51LnRzeA==) | | |
| ... and [512 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `7.53%`.
> The diff coverage is `93.75%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 59.51% -7.54%
==========================================
Files 1001 949 -52
Lines 49380 46724 -2656
Branches 5033 4328 -705
==========================================
- Hits 33112 27809 -5303
- Misses 16140 18915 +2775
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `51.22% <93.75%> (-0.02%)` | :arrow_down: |
| javascript | `?` | |
| python | `64.18% <ø> (-0.02%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/explore/exploreUtils.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvZXhwbG9yZVV0aWxzLmpz) | `58.68% <92.30%> (-10.11%)` | :arrow_down: |
| [superset-frontend/src/explore/AdhocFilter.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQWRob2NGaWx0ZXIuanM=) | `56.06% <100.00%> (-41.24%)` | :arrow_down: |
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvYWxlcnQvRXhlY3V0aW9uTG9nLnRzeA==) | `11.76% <0.00%> (-88.24%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [superset-frontend/src/components/IconTooltip.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvSWNvblRvb2x0aXAudHN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| ... and [373 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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] villebro merged pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
villebro merged pull request #12350:
URL: https://github.com/apache/superset/pull/12350
----------------------------------------------------------------
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.
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] kgabryje commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553879514
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
+ Array.isArray(comparator)
+ ? comparator
+ : [comparator];
+ const isString =
+ firstValue !== undefined && Number.isNaN(Number(firstValue));
Review comment:
Can we replace it with `typeof firstValue === 'string'`?
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `3.01%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 64.04% -3.02%
==========================================
Files 1001 485 -516
Lines 49380 29886 -19494
Branches 5033 0 -5033
==========================================
- Hits 33112 19140 -13972
+ Misses 16140 10746 -5394
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `64.04% <ø> (-0.16%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `74.67% <0.00%> (-8.66%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.58% <0.00%> (-0.28%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `91.37% <0.00%> (-0.14%)` | :arrow_down: |
| [...ontend/src/dashboard/components/dnd/DragHandle.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9EcmFnSGFuZGxlLmpzeA==) | | |
| [superset-frontend/src/components/Menu/NewMenu.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9OZXdNZW51LnRzeA==) | | |
| [superset-frontend/src/components/TableSelector.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVGFibGVTZWxlY3Rvci50c3g=) | | |
| [...erset-frontend/src/profile/components/UserInfo.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Byb2ZpbGUvY29tcG9uZW50cy9Vc2VySW5mby50c3g=) | | |
| [.../src/dashboard/components/menu/WithPopoverMenu.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL21lbnUvV2l0aFBvcG92ZXJNZW51LmpzeA==) | | |
| ... and [509 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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] villebro commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553873942
##########
File path: superset-frontend/src/explore/AdhocFilter.js
##########
@@ -48,22 +48,13 @@ const OPERATORS_TO_SQL = {
};
function translateToSql(adhocMetric, { useSimple } = {}) {
- if (
- (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE &&
- adhocMetric.comparator &&
- adhocMetric.operator) ||
- useSimple
- ) {
- const isMulti = MULTI_OPERATORS.has(adhocMetric.operator);
- const { subject } = adhocMetric;
+ if (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE || useSimple) {
+ const { subject, comparator } = adhocMetric;
Review comment:
`getSimpleSQLExpression is now able to handle invalid formatting requests, hence this strict checking isn't necessary anymore (no translation was performed if operator wasn't specified).
##########
File path: superset-frontend/src/explore/AdhocFilter.js
##########
@@ -48,22 +48,13 @@ const OPERATORS_TO_SQL = {
};
function translateToSql(adhocMetric, { useSimple } = {}) {
- if (
- (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE &&
- adhocMetric.comparator &&
- adhocMetric.operator) ||
- useSimple
- ) {
- const isMulti = MULTI_OPERATORS.has(adhocMetric.operator);
- const { subject } = adhocMetric;
+ if (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE || useSimple) {
+ const { subject, comparator } = adhocMetric;
Review comment:
`getSimpleSQLExpression` is now able to handle invalid formatting requests, hence this strict checking isn't necessary anymore (no translation was performed if operator wasn't specified).
##########
File path: superset-frontend/src/explore/AdhocFilter.js
##########
@@ -48,22 +48,13 @@ const OPERATORS_TO_SQL = {
};
function translateToSql(adhocMetric, { useSimple } = {}) {
- if (
- (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE &&
- adhocMetric.comparator &&
- adhocMetric.operator) ||
- useSimple
- ) {
- const isMulti = MULTI_OPERATORS.has(adhocMetric.operator);
- const { subject } = adhocMetric;
+ if (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE || useSimple) {
+ const { subject, comparator } = adhocMetric;
const operator =
adhocMetric.operator && CUSTOM_OPERATORS.has(adhocMetric.operator)
? OPERATORS_TO_SQL[adhocMetric.operator](adhocMetric)
: OPERATORS_TO_SQL[adhocMetric.operator];
- const comparator = Array.isArray(adhocMetric.comparator)
- ? adhocMetric.comparator.join("','")
- : adhocMetric.comparator || '';
- return getSimpleSQLExpression(subject, operator, comparator, isMulti);
+ return getSimpleSQLExpression(subject, operator, comparator);
Review comment:
`isMulti` logic was moved inside the utility function
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
+ Array.isArray(comparator)
+ ? comparator
+ : [comparator];
+ const isString =
+ firstValue !== undefined && Number.isNaN(Number(firstValue));
+ const quote = isString ? "'" : '';
+ const [prefix, suffix] = isMulti ? ['(', ')'] : ['', ''];
+ const formattedComparators = (comparatorArray || []).map(
+ val => `${quote}${isString ? val.replace("'", "''") : val}${quote}`,
+ );
+ if (comparatorArray) {
+ expression += ` ${prefix}${formattedComparators.join(', ')}${suffix}`;
Review comment:
This isn't super easy to read (apologies), but the unit tests should be easier to reason about.
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
+ Array.isArray(comparator)
+ ? comparator
+ : [comparator];
+ const isString =
+ firstValue !== undefined && Number.isNaN(Number(firstValue));
Review comment:
I originally did, but then it hit me that numeric comparators are in fact strings if entered manually, hence need to be cast first.
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
Review comment:
I wanted to squeeze this in a ternary, but I agree, this probably makes it more readable.
----------------------------------------------------------------
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.
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] villebro merged pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
villebro merged pull request #12350:
URL: https://github.com/apache/superset/pull/12350
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `3.07%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 63.98% -3.08%
==========================================
Files 1001 485 -516
Lines 49380 29886 -19494
Branches 5033 0 -5033
==========================================
- Hits 33112 19122 -13990
+ Misses 16140 10764 -5376
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.98% <ø> (-0.22%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `74.67% <0.00%> (-8.66%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/examples/world\_bank.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
| [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
| [superset/result\_set.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
| [superset/views/base\_api.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.68% <0.00%> (-0.47%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `91.11% <0.00%> (-0.40%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.58% <0.00%> (-0.28%)` | :arrow_down: |
| ... and [514 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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] villebro commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553884166
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
Review comment:
I wanted to squeeze this in a ternary, but I agree, this probably makes it more readable.
----------------------------------------------------------------
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.
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] kgabryje commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553883585
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
+ Array.isArray(comparator)
+ ? comparator
+ : [comparator];
+ const isString =
+ firstValue !== undefined && Number.isNaN(Number(firstValue));
Review comment:
Ah, but that wouldn't handle cases like `"1"`. Nevermind 🙂
----------------------------------------------------------------
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.
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] kgabryje commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553883201
##########
File path: superset-frontend/src/explore/exploreUtils.js
##########
@@ -309,19 +310,28 @@ export const useDebouncedEffect = (effect, delay) => {
}, [callback, delay]);
};
-export const getSimpleSQLExpression = (
- subject,
- operator,
- comparator,
- isMulti,
-) => {
+export const getSimpleSQLExpression = (subject, operator, comparator) => {
+ const isMulti = MULTI_OPERATORS.has(operator);
let expression = subject ?? '';
if (subject && operator) {
expression += ` ${operator}`;
- if (comparator) {
- expression += ` ${isMulti ? "('" : ''}${comparator}${
- isMulti ? "')" : ''
- }`;
+ const firstValue =
+ isMulti && Array.isArray(comparator) ? comparator[0] : comparator;
+ const comparatorArray =
+ comparator === undefined ||
+ comparator === null ||
Review comment:
What do you think about setting `comparatorArray` as an empty array if `comparator` is null or undefined? Then we wouldn't need `comparatorArray || []` in line 330
----------------------------------------------------------------
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.
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] villebro commented on a change in pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #12350:
URL: https://github.com/apache/superset/pull/12350#discussion_r553873942
##########
File path: superset-frontend/src/explore/AdhocFilter.js
##########
@@ -48,22 +48,13 @@ const OPERATORS_TO_SQL = {
};
function translateToSql(adhocMetric, { useSimple } = {}) {
- if (
- (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE &&
- adhocMetric.comparator &&
- adhocMetric.operator) ||
- useSimple
- ) {
- const isMulti = MULTI_OPERATORS.has(adhocMetric.operator);
- const { subject } = adhocMetric;
+ if (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE || useSimple) {
+ const { subject, comparator } = adhocMetric;
Review comment:
`getSimpleSQLExpression is now able to handle invalid formatting requests, hence this strict checking isn't necessary anymore (no translation was performed if operator wasn't specified).
##########
File path: superset-frontend/src/explore/AdhocFilter.js
##########
@@ -48,22 +48,13 @@ const OPERATORS_TO_SQL = {
};
function translateToSql(adhocMetric, { useSimple } = {}) {
- if (
- (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE &&
- adhocMetric.comparator &&
- adhocMetric.operator) ||
- useSimple
- ) {
- const isMulti = MULTI_OPERATORS.has(adhocMetric.operator);
- const { subject } = adhocMetric;
+ if (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE || useSimple) {
+ const { subject, comparator } = adhocMetric;
Review comment:
`getSimpleSQLExpression` is now able to handle invalid formatting requests, hence this strict checking isn't necessary anymore (no translation was performed if operator wasn't specified).
----------------------------------------------------------------
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.
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-io edited a comment on pull request #12350: fix(explore): improve filter translation
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12350:
URL: https://github.com/apache/superset/pull/12350#issuecomment-756709995
# [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=h1) Report
> Merging [#12350](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=desc) (0742b8c) into [master](https://codecov.io/gh/apache/superset/commit/d760e885d78e51a445caf3161a37c70a65e5e4c2?el=desc) (d760e88) will **decrease** coverage by `7.67%`.
> The diff coverage is `93.75%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12350/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12350 +/- ##
==========================================
- Coverage 67.05% 59.38% -7.68%
==========================================
Files 1001 949 -52
Lines 49380 46724 -2656
Branches 5033 4328 -705
==========================================
- Hits 33112 27745 -5367
- Misses 16140 18979 +2839
+ Partials 128 0 -128
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `50.84% <93.75%> (-0.40%)` | :arrow_down: |
| javascript | `?` | |
| python | `64.18% <ø> (-0.02%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/explore/exploreUtils.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvZXhwbG9yZVV0aWxzLmpz) | `58.68% <92.30%> (-10.11%)` | :arrow_down: |
| [superset-frontend/src/explore/AdhocFilter.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQWRob2NGaWx0ZXIuanM=) | `56.06% <100.00%> (-41.24%)` | :arrow_down: |
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvYWxlcnQvRXhlY3V0aW9uTG9nLnRzeA==) | `11.76% <0.00%> (-88.24%)` | :arrow_down: |
| [...src/dashboard/components/gridComponents/Header.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0hlYWRlci5qc3g=) | `10.52% <0.00%> (-86.85%)` | :arrow_down: |
| [superset-frontend/src/components/IconTooltip.tsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvSWNvblRvb2x0aXAudHN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| [...rc/dashboard/components/gridComponents/Divider.jsx](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0RpdmlkZXIuanN4) | `13.33% <0.00%> (-86.67%)` | :arrow_down: |
| ... and [373 more](https://codecov.io/gh/apache/superset/pull/12350/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=footer). Last update [d760e88...5418eff](https://codecov.io/gh/apache/superset/pull/12350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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