Skip to content

Add documentation example for AggregateExprBuilder #15369

@alamb

Description

@alamb
          This looks very similar to https://docs.rs/datafusion/latest/datafusion/physical_expr/aggregate/struct.AggregateExprBuilder.html#method.distinct

Though it seems like that structure has no good example, perhaps you could make a PR to add an doc example of how to use it

Originally posted by @alamb in #14413 (comment)

The idea is to add some examples in the rust API documentation showing how to create expressions like

first_value(a ORDER BY x)

Using the AggregateExprBuilder

Something like this (not quite the actual syntax)

let agg_expr = AggregateExprBuilder::new(first_value_udf())
  .args(col("a")
  .order_by(..)
  .build()?

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions