Skip to content

Commit

Permalink
fix: expose the fluent API fn for approx_distinct instead of the modu…
Browse files Browse the repository at this point in the history
…le (#11644)

* fix: expose the fluent API fn for approx_distinct instead of the module

Fixes: #11643

* add approx_distinct to roundtrip_expr_api test

* lint: cargo fmt
  • Loading branch information
Michael-J-Ward committed Jul 25, 2024
1 parent c951824 commit f12b3db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datafusion/functions-aggregate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ use std::sync::Arc;

/// Fluent-style API for creating `Expr`s
pub mod expr_fn {
pub use super::approx_distinct;
pub use super::approx_distinct::approx_distinct;
pub use super::approx_median::approx_median;
pub use super::approx_percentile_cont::approx_percentile_cont;
pub use super::approx_percentile_cont_with_weight::approx_percentile_cont_with_weight;
Expand Down
3 changes: 2 additions & 1 deletion datafusion/proto/tests/cases/roundtrip_logical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ use datafusion_expr::{
};
use datafusion_functions_aggregate::average::avg_udaf;
use datafusion_functions_aggregate::expr_fn::{
array_agg, avg, bit_and, bit_or, bit_xor, bool_and, bool_or, corr,
approx_distinct, array_agg, avg, bit_and, bit_or, bit_xor, bool_and, bool_or, corr,
};
use datafusion_functions_aggregate::string_agg::string_agg;
use datafusion_proto::bytes::{
Expand Down Expand Up @@ -717,6 +717,7 @@ async fn roundtrip_expr_api() -> Result<()> {
var_pop(lit(2.2)),
stddev(lit(2.2)),
stddev_pop(lit(2.2)),
approx_distinct(lit(2)),
approx_median(lit(2)),
approx_percentile_cont(lit(2), lit(0.5)),
approx_percentile_cont_with_weight(lit(2), lit(1), lit(0.5)),
Expand Down

0 comments on commit f12b3db

Please sign in to comment.