Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Timeseries visualization with Chart Source = Query #20795

Merged
merged 4 commits into from
Jul 22, 2022

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Jul 20, 2022

SUMMARY

Fix issue with running timeseries queries with chart source. Needed to create a new function get_timestamp_expression to handle dict vs. objects

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jul 20, 2022

Codecov Report

Merging #20795 (9b4a7ad) into master (81bd496) will decrease coverage by 11.47%.
The diff coverage is 55.26%.

❗ Current head 9b4a7ad differs from pull request most recent head 3d959af. Consider uploading reports for the commit 3d959af to get more accurate results

@@             Coverage Diff             @@
##           master   #20795       +/-   ##
===========================================
- Coverage   66.28%   54.81%   -11.48%     
===========================================
  Files        1756     1756               
  Lines       66756    66760        +4     
  Branches     7049     7059       +10     
===========================================
- Hits        44252    36594     -7658     
- Misses      20708    28368     +7660     
- Partials     1796     1798        +2     
Flag Coverage Δ
hive 53.25% <46.61%> (+<0.01%) ⬆️
mysql ?
postgres ?
presto 53.11% <46.61%> (+<0.01%) ⬆️
python 57.81% <46.61%> (-23.70%) ⬇️
sqlite ?
unit 50.25% <43.22%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...ackages/superset-ui-core/src/query/types/Column.ts 100.00% <ø> (ø)
...s/legacy-plugin-chart-heatmap/src/controlPanel.tsx 57.14% <ø> (ø)
.../plugin-chart-echarts/src/MixedTimeseries/index.ts 25.00% <ø> (ø)
...ins/plugin-chart-echarts/src/components/Echart.tsx 0.00% <0.00%> (ø)
...rset-frontend/src/components/Chart/chartReducer.ts 25.00% <0.00%> (ø)
...t-frontend/src/dashboard/actions/dashboardState.js 37.05% <ø> (+0.50%) ⬆️
...rset-frontend/src/dashboard/actions/datasources.ts 0.00% <0.00%> (ø)
...frontend/src/dashboard/components/Header/index.jsx 59.39% <ø> (ø)
...board/components/nativeFilters/FilterBar/index.tsx 60.58% <ø> (ø)
... and 341 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

)
if isinstance(dttm_col, dict):
timestamp = self.get_timestamp_expression(
dttm_col, time_grain, template_processor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need the variable declaration that the below function has?

)
if isinstance(col_obj, dict):
sqla_col = self.get_timestamp_expression(
col_obj, time_grain, template_processor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question here.

@hughhhh hughhhh closed this Jul 21, 2022
@hughhhh hughhhh reopened this Jul 21, 2022
@hughhhh hughhhh merged commit 2c01097 into apache:master Jul 22, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants