Skip to content

Support SUM AVG, MIN, MAX on Time columns.  #3166

@alamb

Description

@alamb

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

DataFusion does not support SUM, AVG, MIN or MAX on Time type columns a standard SQL feature that could be used to sum how much cumulative time was spent doing some operation, for example

Reproducer is as follows:

select 
  sum(t), 
  avg(t)
from 
  (select cast ('11:00:00' as TIME) as t) as sq;

Doing so today will result in

select 
  sum(t), 
  avg(t)
from 
  (select cast ('11:00:00' as TIME) as t) as sq;
Plan("The function Sum does not support inputs of type Time64(Nanosecond).")
❯ 

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
N/A

Additional context
As described in #200

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions