Skip to content

@groupby on a function of a field #27

Description

@zygmuntszpak

I would like to be able to group on the result of applying a function to one of the columns.
For example, suppose that I have a column :DATETIME which stores the year/month/day/h/m/s.
In some queries I might want to group on the DATE only, whereas in other queries I might want to group
on the TIME.

Hence, it would like to write something like this:

@apply t begin
    @groupby Date.Date.(:DATETIME) {length = length(_)}
end

Is this type of operation currently supported, but I am just using the wrong syntax? As a workaround I could always add more columns using @transform to explicitly split the DATETIME into DATE and TIME, but I was wondering if there is another solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions