Skip to content

Expose the timezone scalar function #1865

Backlog

Description

@slachiewicz

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
DataFusion 56 has a timezone(zone, expression) scalar function, the function form of expression AT TIME ZONE zone. It is available in SQL but has no wrapper in datafusion.functions, so the DataFrame API has no direct way to convert a timestamp to another timezone.

Describe the solution you'd like
Add functions.timezone(zone, arg) with a docstring example and a test in python/tests/test_functions.py.

Describe alternatives you've considered
Running the conversion through ctx.sql, or to_local_time, which only covers stripping the timezone.

Additional context
Found by comparing the Python API with DataFusion 56.0.0 using the check-upstream skill.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions