Skip to content

Conversation

@fivetran-kwoodbeck
Copy link
Collaborator

Maps Snowflake's LOCALTIMESTAMP() to CurrentTimestamp, similar to other timestamp aliases (GETDATE, SYSTIMESTAMP).

Documentation:
https://docs.snowflake.com/en/sql-reference/functions/localtimestamp

Changes:

  • snowflake.py: Add LOCALTIMESTAMP → CurrentTimestamp in FUNCTIONS
  • typing/snowflake.py: Add type annotations for CurrentTimestamp and Localtimestamp returning TIMESTAMPLTZ
  • test_dialect.py: Exclude Snowflake from LOCALTIMESTAMP(n) read tests (can't roundtrip due to alias, test included instead in test_snowflake.py)
  • test_snowflake.py: Add identity tests for LOCALTIMESTAMP() and LOCALTIMESTAMP(3)
  • annotate_functions.sql: Add type annotation tests

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

SQLGlot Integration Test Results

Comparing:

  • this branch (sqlglot:feature/annotatetype-localtimestamp, sqlglot version: feature/annotatetype-localtimestamp)
  • baseline (main, sqlglot version: 28.5.1.dev54)

⚠️ Limited to dialects: snowflake

By Dialect

dialect main sqlglot:feature/annotatetype-localtimestamp difference links
snowflake -> duckdb 626/1085 passed (57.7%) 626/1085 passed (57.7%) No change full result / delta
snowflake -> snowflake 981/1085 passed (90.4%) 981/1085 passed (90.4%) No change full result / delta

Overall

main: 2170 total, 1607 passed (pass rate: 74.1%), sqlglot version: 28.5.1.dev54

sqlglot:feature/annotatetype-localtimestamp: 2170 total, 1607 passed (pass rate: 74.1%), sqlglot version: feature/annotatetype-localtimestamp

Difference: No change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants