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

chore(engine): Translate fractional time grains—requires @superset-ui bump #17078

Merged

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Oct 12, 2021

SUMMARY

In #17050 @villebro and myself were discussing why fractional ISO8601 periods were being used to represent either 30 minutes (PT0.5H) or the quarter (P0.25Y) rather than PT30M and P3M respectively.

This PR updates the time grains to reflect the preferred format. Note the @superset-ui package needed to be bumped to 0.18.12 as part of the change given the time grains are defined in both repos.

TESTING INSTRUCTIONS

Tested locally. Additionally grepped the coded base by running git grep "PT0.5H" and git grep "P0.25Y"`.

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

@john-bodley john-bodley requested a review from a team as a code owner October 12, 2021 19:21
@john-bodley john-bodley force-pushed the john-bodley--db-engine-specs-iso8601 branch from 7f23f15 to c288668 Compare October 12, 2021 20:10
@john-bodley john-bodley force-pushed the john-bodley--db-engine-specs-iso8601 branch from c288668 to 14f2284 Compare October 12, 2021 20:35
@john-bodley john-bodley force-pushed the john-bodley--db-engine-specs-iso8601 branch from 14f2284 to 42fb888 Compare October 12, 2021 20:45
@codecov
Copy link

codecov bot commented Oct 12, 2021

Codecov Report

Merging #17078 (d80a6b6) into master (959fd76) will decrease coverage by 0.21%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17078      +/-   ##
==========================================
- Coverage   76.88%   76.66%   -0.22%     
==========================================
  Files        1031     1031              
  Lines       55197    55197              
  Branches     7506     7506              
==========================================
- Hits        42436    42317     -119     
- Misses      12509    12628     +119     
  Partials      252      252              
Flag Coverage Δ
hive ?
mysql 81.92% <ø> (ø)
postgres 81.93% <ø> (ø)
presto ?
python 82.02% <ø> (-0.42%) ⬇️
sqlite 81.61% <ø> (ø)

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

Impacted Files Coverage Δ
superset/db_engine_specs/ascend.py 100.00% <ø> (ø)
superset/db_engine_specs/athena.py 89.28% <ø> (ø)
superset/db_engine_specs/base.py 88.17% <ø> (-0.39%) ⬇️
superset/db_engine_specs/bigquery.py 85.97% <ø> (ø)
superset/db_engine_specs/clickhouse.py 66.03% <ø> (ø)
superset/db_engine_specs/crate.py 92.30% <ø> (ø)
superset/db_engine_specs/db2.py 91.66% <ø> (ø)
superset/db_engine_specs/dremio.py 90.00% <ø> (ø)
superset/db_engine_specs/drill.py 83.33% <ø> (ø)
superset/db_engine_specs/druid.py 86.27% <ø> (ø)
... and 27 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 959fd76...d80a6b6. Read the comment docs.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Makes sense. From what I remember when I added the time grains in ISO format I was just looking for a standard format to represent intervals, I don't think there was any reason to choose 0.25Y instead of 3M. And I agree the latter is more clear.

@john-bodley john-bodley force-pushed the john-bodley--db-engine-specs-iso8601 branch from 9b134d0 to 7ff7fc1 Compare October 13, 2021 02:40
@john-bodley john-bodley force-pushed the john-bodley--db-engine-specs-iso8601 branch from 7ff7fc1 to 6ccaa17 Compare October 13, 2021 02:42
@john-bodley john-bodley changed the title chore(engine): Translate fractional time grains chore(engine): Translate fractional time grains—requires @superset-ui bump Oct 13, 2021
@john-bodley john-bodley merged commit b9ff85d into apache:master Oct 13, 2021
@john-bodley john-bodley deleted the john-bodley--db-engine-specs-iso8601 branch October 13, 2021 04:40
@betodealmeida
Copy link
Member

@john-bodley do we need an accompanying migration updating saved charts? We're getting an error when loading the sales dashboard "No grain spec for P0.25Y for database postgresql".

opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
… bump (apache#17078)

* chore(engine): Translate fractional time grains

* Bump @superset-ui

Co-authored-by: John Bodley <john.bodley@airbnb.com>
eschutho pushed a commit that referenced this pull request Dec 16, 2021
… bump (#17078)

* chore(engine): Translate fractional time grains

* Bump @superset-ui

Co-authored-by: John Bodley <john.bodley@airbnb.com>
@mistercrunch mistercrunch added 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 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/L 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants