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

Feature: support Timestamp with TZ for function to_unixtime #14659

Open
Tracked by #14661
xudong963 opened this issue Feb 14, 2025 · 2 comments
Open
Tracked by #14661

Feature: support Timestamp with TZ for function to_unixtime #14659

xudong963 opened this issue Feb 14, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@xudong963
Copy link
Member

Is your feature request related to a problem or challenge?

> select to_unixtime(arrow_cast('2020-01-01 00:10:20.123'::timestamp, 'Timestamp(Second, Some("America/New_York"))'));
Execution error: Unsupported data type Timestamp(Second, Some("America/New_York")) for function to_unixtime

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

Timestamp without TZ is supported for to_unixtime

> select to_unixtime(arrow_cast('2020-01-01 00:10:20.123'::timestamp, 'Timestamp(Second, None)'));
+------------------------------------------------------------------------------------------+
| to_unixtime(arrow_cast(Utf8("2020-01-01 00:10:20.123"),Utf8("Timestamp(Second, None)"))) |
+------------------------------------------------------------------------------------------+
| 1577837420                                                                               |
+------------------------------------------------------------------------------------------+
@xudong963 xudong963 added the enhancement New feature or request label Feb 14, 2025
@Omega359
Copy link
Contributor

This works on main:

query I
select to_unixtime(arrow_cast('2020-01-01 00:10:20.123'::timestamp, 'Timestamp(Second, Some("America/New_York"))'));
----
1577855420

@Omega359
Copy link
Contributor

I think I fixed this earlier this month in #14490

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants