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(druid): Fix regression with ISO 8601 format #17079

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

john-bodley
Copy link
Member

SUMMARY

This PR fixes a regression I introduced in #17050 as it seems like the P0.25Y ISO8601 isn't supported,

druid> SELECT TIME_FLOOR(TIME_PARSE('2020-10-12'), 'P0.25Y')
Unknown exception (java.lang.IllegalArgumentException): Invalid format: "P0.25Y"

yet per the Druid SQL documentation for TIME_FLOOR

Rounds down a timestamp, returning it as a new timestamp. Period can be any ISO8601 period, like P3M (quarters) or PT12H (half-days).

it explicitly states any ISO8601 format is acceptable. This change uses P3M instead (which is the direction o #17078).

TESTING INSTRUCTIONS

druid> SELECT TIME_FLOOR(TIME_PARSE('2020-10-12'), 'P3M')
2020-10-01T00:00:00.000Z

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 Oct 12, 2021

Codecov Report

Merging #17079 (46907dc) into master (5e85f48) will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17079      +/-   ##
==========================================
- Coverage   76.88%   76.81%   -0.08%     
==========================================
  Files        1031     1031              
  Lines       55183    55183              
  Branches     7505     7505              
==========================================
- Hits        42430    42388      -42     
- Misses      12501    12543      +42     
  Partials      252      252              
Flag Coverage Δ
hive 81.47% <ø> (ø)
javascript 70.82% <ø> (ø)
mysql 81.92% <ø> (ø)
postgres 81.93% <ø> (ø)
presto ?
python 82.28% <ø> (-0.15%) ⬇️
sqlite 81.60% <ø> (ø)

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

Impacted Files Coverage Δ
superset/db_engine_specs/druid.py 86.27% <ø> (ø)
superset/db_engine_specs/presto.py 84.30% <0.00%> (-5.65%) ⬇️
superset/connectors/sqla/models.py 85.83% <0.00%> (-1.42%) ⬇️
superset/models/core.py 89.26% <0.00%> (-0.74%) ⬇️

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 5e85f48...46907dc. Read the comment docs.

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM

@john-bodley john-bodley merged commit 11d52cb into master Oct 12, 2021
@john-bodley john-bodley deleted the john-bodley--fix-17050 branch October 12, 2021 22:14
@john-bodley john-bodley changed the title fix(druid): Fix regression with ISO8601 format fix(druid): Fix regression with ISO 8601 format Oct 14, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants