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

feat: simplify SQLite time grain #19745

Merged

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Apr 17, 2022

SUMMARY

The current expression for quarter time grain in SQLite is horrible and I found a way of simplifying it. I also added more time grains, and cleaned all of them so that the return type is consistent (DATETIME).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

Added unit tests.

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 Apr 17, 2022

Codecov Report

Merging #19745 (16c8d49) into master (8865656) will decrease coverage by 0.14%.
The diff coverage is 68.13%.

❗ Current head 16c8d49 differs from pull request most recent head de0d78f. Consider uploading reports for the commit de0d78f to get more accurate results

@@            Coverage Diff             @@
##           master   #19745      +/-   ##
==========================================
- Coverage   66.51%   66.36%   -0.15%     
==========================================
  Files        1684     1714      +30     
  Lines       64560    65052     +492     
  Branches     6625     6722      +97     
==========================================
+ Hits        42939    43171     +232     
- Misses      19926    20169     +243     
- Partials     1695     1712      +17     
Flag Coverage Δ
hive ?
mysql 81.94% <96.27%> (-0.01%) ⬇️
postgres 81.98% <96.27%> (-0.01%) ⬇️
presto ?
python 82.06% <96.27%> (-0.37%) ⬇️
sqlite 81.74% <96.27%> (-0.03%) ⬇️
unit ?

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

Impacted Files Coverage Δ
...-chart-controls/src/sections/advancedAnalytics.tsx 14.28% <0.00%> (-19.05%) ⬇️
...rset-ui-chart-controls/src/sections/chartTitle.tsx 100.00% <ø> (ø)
...omponents/ColumnConfigControl/ColumnConfigItem.tsx 0.00% <ø> (ø)
.../shared-controls/components/RadioButtonControl.tsx 0.00% <ø> (ø)
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...d/packages/superset-ui-core/src/models/Registry.ts 100.00% <ø> (ø)
...superset-ui-core/src/query/types/PostProcessing.ts 100.00% <ø> (ø)
...legacy-plugin-chart-partition/src/controlPanel.tsx 33.33% <ø> (ø)
...gins/legacy-plugin-chart-rose/src/controlPanel.tsx 100.00% <ø> (ø)
...gins/legacy-plugin-chart-world-map/src/WorldMap.js 0.00% <0.00%> (ø)
... and 186 more

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 8865656...de0d78f. Read the comment docs.

@betodealmeida betodealmeida marked this pull request as draft April 17, 2022 05:42
@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 30, 2022
@betodealmeida betodealmeida marked this pull request as ready for review April 30, 2022 01:28
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.

Super nice tests! 😮 👍 That's probably a pattern we should invest more in to isolate engine-specific tests in the unit test suite. LGTM

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

Successfully merging this pull request may close these issues.

4 participants