Skip to content

Add aggregate functions to ExprTrait #989

@timothee-haudebourg

Description

@timothee-haudebourg

Motivation

Aggregate functions are only defined as Expr methods. Using one of them currently requires wrapping the expression inside a Expr::expr(...) to get an Expr. For instance: Expr::expr(Expr::case(...)).sum().

Proposed Solutions

By adding aggregate functions to the ExprTrait trait, it would be possible to simply write Expr::case(...).sum(), which is much more idiomatic.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions