Skip to content

Add convert_dttm method to SnowflakeEngineSpec - #8551

Merged
villebro merged 1 commit into
apache:masterfrom
villebro:snowflake_dttm
Nov 13, 2019
Merged

villebro merged 1 commit into
apache:masterfrom
villebro:snowflake_dttm

Conversation

@villebro

Copy link
Copy Markdown
Member

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

With the introduction of SIP-15, temporal handling can be improved by making sure dates and datetimes are cast to their respective native SQL types. This adds correct handling of DATE, DATETIME and TIMESTAMP to the Snowflake spec along with tests.

While the UI seems to imply that DATETIME and TIMESTAMP are truncated to millisecond precision, it is my understanding that they are in fact stored at nanosecond precision, hence timespec=microsecond like other engines with micro-/nanosecond precision.

TEST PLAN

CI + executing test expressions in Snowflake UI:
image

REVIEWERS

@john-bodley

@villebro
villebro merged commit 90275fe into apache:master Nov 13, 2019


class SnowflakeTestCase(DbEngineSpecTestCase):
def test_convert_dttm(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👏

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 First shipped in 0.36.0 labels Feb 28, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
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 🚢 0.36.0 First shipped in 0.36.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants