Skip to content

Add support for cast(DataType.duration(s/ms/us/ns) #4399

@rohitkulshreshtha

Description

@rohitkulshreshtha

Is your feature request related to a problem?

As part of #4095 we have added

  • dt.total_seconds()
  • dt.total_nanoseconds()
  • dt.total_milliseconds()
  • dt.total_microseconds()
  • dt.total_minutes()
  • dt.total_hours()
  • dt.total_days()

Within the rust code, however, we do not support the following:

  • Series::cast(DataType.duration(s))
  • Series::cast(DataType.duration(ms))
  • Series::cast(DataType.duration(us))
  • Series::cast(DataType.duration(ns))

Describe the solution you'd like

Add support for

  • Series::cast(DataType.duration(s))
  • Series::cast(DataType.duration(ms))
  • Series::cast(DataType.duration(us))
  • Series::cast(DataType.duration(ns))

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

No

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is neededp2 (backlog)Nice to have features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions