You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DataFrame API: allow aggregate functions in select() #17874
Is your feature request related to a problem or challenge?
Be able to run something like this:
use datafusion::error::Result;use datafusion::functions_aggregate::expr_fn::approx_distinct;use datafusion::prelude::*;#[tokio::main]asyncfnmain() -> Result<()>{let ctx = SessionContext::new();let testdata = datafusion::test_util::arrow_test_data();
ctx.register_csv("aggregate_test_100",format!("{testdata}/csv/aggregate_test_100.csv"),CsvReadOptions::default().has_header(true),).await?;
ctx.table("aggregate_test_100").await?
// Run aggregate in select() without needing to do via aggregate().select(vec![
approx_distinct(col("c9")).alias("count_c9"),
approx_distinct(cast(col("c9"), arrow_schema::DataType::Utf8View)).alias("count_c9_str"),])?
.show().await?;Ok(())}
Activity
umangPokhriyall commentedon Oct 3, 2025
take
Jefffrey commentedon Jan 20, 2026
Removing assignment as there has been no activity. Feel free to
takethis issue again if it is still in progress.cj-zhukov commentedon Mar 15, 2026
take
DataFrame API: allow aggregate functions in select() (apache#17874)
DataFrame API: allow aggregate functions in select() 2 (apache#17874) (…