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

render func.now() as CURRENT_TIMESTAMP #396

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

sjhewitt
Copy link
Contributor

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-760624: func.now() should be rendered as CURRENT_TIMESTAMP #395

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding new credentials
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    implements SnowflakeCompiler.visit_now_func to render func.now() as CURRENT_TIMESTAMP

Copy link
Collaborator

@sfc-gh-sfan sfc-gh-sfan left a comment

Choose a reason for hiding this comment

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

LGTM. @sfc-gh-aling please also take a look :)

I'll create a accompany PR to test.

@sfc-gh-sfan
Copy link
Collaborator

Test PR in #397

@sfc-gh-sfan
Copy link
Collaborator

Can you fix the case in your test? E AssertionError: 'SELECT CURRENT_TIMESTAMP AS now_1' != 'SELECT CURRENT_TIMESTAMP as now_1' on dialect <snowflake.sqlalchemy.snowdialect.SnowflakeDialect object at 0x7f9b46db9af0>

@sfc-gh-aling sfc-gh-aling merged commit c14e817 into snowflakedb:main Mar 17, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SNOW-760624: func.now() should be rendered as CURRENT_TIMESTAMP
3 participants