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

Spark functions months_bewteen & to_timestamp not transpiling to DuckDB #1928

Closed
richard-a-lott opened this issue Jul 18, 2023 · 1 comment · Fixed by #1929
Closed

Spark functions months_bewteen & to_timestamp not transpiling to DuckDB #1928

richard-a-lott opened this issue Jul 18, 2023 · 1 comment · Fixed by #1929
Assignees

Comments

@richard-a-lott
Copy link

I'm attempting to transpile from Spark to DuckDB. Sqlglot doesn't seem to be recognising the spark functions "months_between" and "to_timestamp".

See example below (apologies for the image, I can't paste the code directly), neither of those functions gets transpiled:

image

"months_bewteen" should become "date_diff", and
"to_timestamp" should become "strptime" in duckdb, see below:

image

Official Documentation
spark: months_bewteen
spark: to_timestamp
duckdb: time functions

@georgesittas
Copy link
Collaborator

Thanks for the report, I'll take a look

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 a pull request may close this issue.

2 participants