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: Handle Python date format for GENERIC_CHART_AXES feature #25135

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Aug 30, 2023

SUMMARY

Fixes #25134.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE

SELECT date_trunc('day', CAST(epoch_s AS TIMESTAMP)) AS epoch_s,
       COUNT(*) AS count
FROM
  (SELECT 123 AS epoch_s,
          12300 AS epoch_ms,
          '2023-01-01' AS ds) AS virtual_table
GROUP BY date_trunc('day', CAST(epoch_s AS TIMESTAMP))
ORDER BY count DESC
LIMIT 1000;

AFTER

SELECT date_trunc('day', CAST(from_unixtime(epoch_s) AS TIMESTAMP)) AS epoch_s,
       COUNT(*) AS count
FROM
  (SELECT 123 AS epoch_s,
          12300 AS epoch_ms,
          '2023-01-01' AS ds) AS virtual_table
GROUP BY date_trunc('day', CAST(from_unixtime(epoch_s) AS TIMESTAMP))
ORDER BY count DESC
LIMIT 1000;

TESTING INSTRUCTIONS

Tested locally. Regrettably there's currently no unit testing for the entire adhoc_column_to_sqla function.

ADDITIONAL INFORMATION

  • Has associated issue: epoch_s columns not converted to timestamps correctly in 3.0.0rc3  #25134
  • 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 added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Aug 30, 2023
@john-bodley john-bodley changed the title fix: Address issue #25134 fix: Handle Python date format for GENERIC_CHART_AXES feature Aug 30, 2023
@john-bodley john-bodley marked this pull request as ready for review August 31, 2023 18:18
Copy link
Member

@michael-s-molina michael-s-molina 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 de9515c into apache:master Aug 31, 2023
56 checks passed
@john-bodley john-bodley deleted the john-bodley--fix-25134 branch August 31, 2023 20:50
michael-s-molina pushed a commit that referenced this pull request Sep 1, 2023
darwinsubramaniam pushed a commit to darwinsubramaniam/superset that referenced this pull request Sep 7, 2023
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 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 v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

epoch_s columns not converted to timestamps correctly in 3.0.0rc3
3 participants