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

refactor: decouple DataTablesPane #20109

Merged
merged 12 commits into from
May 26, 2022

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented May 18, 2022

SUMMARY

In order to show the results pane in the Dashboard(separate PR), this PR decouples DataTablesPane and fix some bugs from the original implementation.

  1. Samples Pane can't send a force query
  2. Samples Pane can't re-query after editing the dataset
  3. Results Pane and Chart Pane parallel sending queries.
  4. correctly show the error message in Results Pane if it's an invalid query.
  5. correctly show data in Results Pane and samples Pane when switching dataset

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

force-query Samples Pane

force-query.in.samples.pane.mov

trigger re-query Samples Pane after editing the dataset

re-query.samples.pane.mov

parallel sending query

parallel query after

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

@zhaoyongjie zhaoyongjie force-pushed the refactor_datatable branch 3 times, most recently from d28d8a5 to cde8b29 Compare May 20, 2022 13:29
@zhaoyongjie zhaoyongjie marked this pull request as ready for review May 20, 2022 13:43
@codecov
Copy link

codecov bot commented May 20, 2022

Codecov Report

Merging #20109 (a112bec) into master (ac4158e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #20109   +/-   ##
=======================================
  Coverage   66.43%   66.43%           
=======================================
  Files        1722     1722           
  Lines       64640    64644    +4     
  Branches     6822     6822           
=======================================
+ Hits        42944    42948    +4     
  Misses      19962    19962           
  Partials     1734     1734           
Flag Coverage Δ
hive 53.70% <42.85%> (-0.01%) ⬇️
mysql 82.14% <100.00%> (+<0.01%) ⬆️
postgres 82.19% <100.00%> (+<0.01%) ⬆️
presto 53.55% <42.85%> (-0.01%) ⬇️
python 82.62% <100.00%> (+<0.01%) ⬆️
sqlite 81.93% <100.00%> (+<0.01%) ⬆️
unit 49.47% <42.85%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...erset-frontend/src/components/Chart/chartAction.js 53.79% <ø> (ø)
...ntend/src/explore/components/ExploreChartPanel.jsx 70.49% <ø> (ø)
.../explore/components/ExploreViewContainer/index.jsx 52.02% <100.00%> (ø)
...lore/components/useOriginalFormattedTimeColumns.ts 75.00% <100.00%> (ø)
superset/datasets/api.py 86.53% <100.00%> (+0.22%) ⬆️
superset/db_engine_specs/bigquery.py 84.84% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac4158e...a112bec. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM and tested to work well. I tried my best to compare some of the removed/added files, but it was difficult to get a good grasp of which functionality had changed, but everything looks sensible.

Comment on lines +69 to +70
const { colnames, coltypes } = json.result[0];
// Only displaying the first query is currently supported
Copy link
Member

Choose a reason for hiding this comment

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

Idea for follow-up: Now it should be fairly simple to add support for displaying the other queries data, too. We could have a dropdown next to the search field where you could choose the query if there are more than one available.

@zhaoyongjie zhaoyongjie merged commit e9007e3 into apache:master May 26, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added the 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels label 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/XXL 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants