Skip to content

Conversation

@ALongJohnson
Copy link
Contributor

fixes #5059

Comment on lines 15 to 18

def currenttimestamp_sql(self, expression: exp.CurrentTimestamp) -> str:
this = expression.this
return self.func("CURRENT_TIMESTAMP", this) if this else "CURRENT_TIMESTAMP"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't want a function right? You can only use it without parentheses.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting, it worked for my usecase but i see the way you've done it in your commit. Thanks !

@georgesittas georgesittas changed the title feat(druid)!: support current_timestamp feat(druid): support current_timestamp May 10, 2025
@georgesittas georgesittas changed the title feat(druid): support current_timestamp fix: support current_timestamp May 10, 2025
@georgesittas georgesittas merged commit 537b5b4 into tobymao:main May 10, 2025
0 of 6 checks passed
georgesittas added a commit that referenced this pull request May 10, 2025
* feat: added support for current_timestamp

* test: Added tests for current_timestamp

---------

Co-authored-by: Jo <[email protected]>
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.

Druid: CURRENT_TIMESTAMP function being read and transpiled wrong

2 participants