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/27 18:53:46 UTC

[GitHub] [superset] betodealmeida opened a new pull request #12796: fix: samples should not be timeseries

betodealmeida opened a new pull request #12796:
URL: https://github.com/apache/superset/pull/12796


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   When we fetch samples for a given viz we need to ensure the `is_timeseries` attribute is false, otherwise Superset will add a group by on the temporal column, resuilting in an invalid column:
   
   ```sql
   SELECT ts AS ts,
          name AS name,
          text AS text,
          DATE(ts) AS __timestamp  -- HERE
   FROM
     (SELECT m.ts,
             c.name,
             m.text
      FROM messages m
      JOIN channels c ON m.channel_id = c.id) AS expr_qry
   WHERE ts >= STR_TO_DATE('2020-10-27 00:00:00.000000', '%Y-%m-%d %H:%i:%s.%f')
     AND ts < STR_TO_DATE('2021-01-27 00:00:00.000000', '%Y-%m-%d %H:%i:%s.%f')
     AND name != 'github-notifications'
   GROUP BY DATE(ts)  -- HERE
   LIMIT 1000
   ```
   
   The query above is invalid because the `GROUP BY` should contain all non-aggregation expressions from the `SELECT`.
   
   Because of this, some charts fail to load their samples.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   Before:
   
   ![Screenshot_2021-01-27 Messages per Channel(1)](https://user-images.githubusercontent.com/1534870/106039351-e2ffc400-608d-11eb-900a-35027bcb0857.png)
   
   After:
   
   ![Screenshot_2021-01-27 Messages per Channel](https://user-images.githubusercontent.com/1534870/106038992-708ee400-608d-11eb-938c-a6b459f2c4e5.png)
   
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   Open chart and navigated to "DATA" -> "VIEW SAMPLES", now it works as expected.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [X] Has associated issue: https://github.com/apache/superset/issues/12504
   - [ ] 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] villebro merged pull request #12796: fix: samples should not be timeseries

Posted by GitBox <gi...@apache.org>.
villebro merged pull request #12796:
URL: https://github.com/apache/superset/pull/12796


   


----------------------------------------------------------------
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 #12796: fix: samples should not be timeseries

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12796:
URL: https://github.com/apache/superset/pull/12796#issuecomment-768568266






----------------------------------------------------------------
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 #12796: fix: samples should not be timeseries

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #12796:
URL: https://github.com/apache/superset/pull/12796#issuecomment-768568266


   # [Codecov](https://codecov.io/gh/apache/superset/pull/12796?src=pr&el=h1) Report
   > Merging [#12796](https://codecov.io/gh/apache/superset/pull/12796?src=pr&el=desc) (979f908) into [master](https://codecov.io/gh/apache/superset/commit/044d1ae3a3d31d333301bc37b6e6640985e37c7f?el=desc) (044d1ae) will **decrease** coverage by `5.30%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12796/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12796?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12796      +/-   ##
   ==========================================
   - Coverage   67.00%   61.69%   -5.31%     
   ==========================================
     Files        1022      534     -488     
     Lines       50047    19911   -30136     
     Branches     4914     4914              
   ==========================================
   - Hits        33533    12284   -21249     
   + Misses      16390     7427    -8963     
   - Partials      124      200      +76     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `61.69% <ø> (ø)` | |
   | 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/12796?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...t-frontend/src/dashboard/containers/SliceAdder.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL1NsaWNlQWRkZXIuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...t-frontend/src/explore/reducers/getInitialState.js](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvZ2V0SW5pdGlhbFN0YXRlLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...-frontend/src/visualizations/presets/MainPreset.js](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL3ByZXNldHMvTWFpblByZXNldC5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...tend/src/dashboard/containers/DashboardBuilder.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZEJ1aWxkZXIuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [669 more](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12796?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/12796?src=pr&el=footer). Last update [044d1ae...979f908](https://codecov.io/gh/apache/superset/pull/12796?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 #12796: fix: samples should not be timeseries

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12796:
URL: https://github.com/apache/superset/pull/12796#issuecomment-768568266


   # [Codecov](https://codecov.io/gh/apache/superset/pull/12796?src=pr&el=h1) Report
   > Merging [#12796](https://codecov.io/gh/apache/superset/pull/12796?src=pr&el=desc) (979f908) into [master](https://codecov.io/gh/apache/superset/commit/044d1ae3a3d31d333301bc37b6e6640985e37c7f?el=desc) (044d1ae) will **increase** coverage by `2.95%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12796/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12796?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12796      +/-   ##
   ==========================================
   + Coverage   67.00%   69.95%   +2.95%     
   ==========================================
     Files        1022      534     -488     
     Lines       50047    19930   -30117     
     Branches     4914     4914              
   ==========================================
   - Hits        33533    13943   -19590     
   + Misses      16390     5854   -10536     
   - Partials      124      133       +9     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `46.67% <ø> (-4.22%)` | :arrow_down: |
   | javascript | `61.69% <ø> (ø)` | |
   | 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/12796?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...et-frontend/src/dashboard/actions/dashboardInfo.js](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZEluZm8uanM=) | `33.33% <0.00%> (-66.67%)` | :arrow_down: |
   | [...nd/src/dashboard/util/getFilterValuesByFilterId.js](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclZhbHVlc0J5RmlsdGVySWQuanM=) | `25.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [...hboard/components/filterscope/FilterScopeModal.tsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2ZpbHRlcnNjb3BlL0ZpbHRlclNjb3BlTW9kYWwudHN4) | `31.25% <0.00%> (-43.75%)` | :arrow_down: |
   | [...t-frontend/src/dashboard/reducers/dashboardInfo.js](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9yZWR1Y2Vycy9kYXNoYm9hcmRJbmZvLmpz) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | [...hboard/components/resizable/ResizableContainer.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVDb250YWluZXIuanN4) | `71.87% <0.00%> (-28.13%)` | :arrow_down: |
   | [...nents/controls/MetricControl/AdhocMetricOption.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljT3B0aW9uLmpzeA==) | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | [...nd/src/explore/components/controls/TextControl.tsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9UZXh0Q29udHJvbC50c3g=) | `45.23% <0.00%> (-23.81%)` | :arrow_down: |
   | [...rontend/src/dashboard/components/DashboardGrid.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZEdyaWQuanN4) | `66.66% <0.00%> (-22.81%)` | :arrow_down: |
   | [...rols/MetricControl/AdhocMetricEditPopoverTitle.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljRWRpdFBvcG92ZXJUaXRsZS5qc3g=) | `70.58% <0.00%> (-20.59%)` | :arrow_down: |
   | [...ore/components/controls/AnnotationLayerControl.jsx](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Bbm5vdGF0aW9uTGF5ZXJDb250cm9sLmpzeA==) | `64.28% <0.00%> (-17.15%)` | :arrow_down: |
   | ... and [523 more](https://codecov.io/gh/apache/superset/pull/12796/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12796?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/12796?src=pr&el=footer). Last update [044d1ae...979f908](https://codecov.io/gh/apache/superset/pull/12796?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