Skip to content

Feature: support Timestamp with TZ for function to_unixtime #14659

@xudong963

Description

@xudong963

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                                                                               |
+------------------------------------------------------------------------------------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions