From c231eee7c123b8341d9d776a087cd8b993576e0e Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Wed, 16 Oct 2024 00:46:31 -0700 Subject: [PATCH] fix: respect feature flags for geo function (#4836) --- src/common/function/src/scalars/aggregate.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/function/src/scalars/aggregate.rs b/src/common/function/src/scalars/aggregate.rs index f7ce316b6c..08edf43568 100644 --- a/src/common/function/src/scalars/aggregate.rs +++ b/src/common/function/src/scalars/aggregate.rs @@ -31,7 +31,6 @@ pub use polyval::PolyvalAccumulatorCreator; pub use scipy_stats_norm_cdf::ScipyStatsNormCdfAccumulatorCreator; pub use scipy_stats_norm_pdf::ScipyStatsNormPdfAccumulatorCreator; -use super::geo::encoding::JsonPathEncodeFunctionCreator; use crate::function_registry::FunctionRegistry; /// A function creates `AggregateFunctionCreator`. @@ -93,6 +92,11 @@ impl AggregateFunctions { register_aggr_func!("scipystatsnormcdf", 2, ScipyStatsNormCdfAccumulatorCreator); register_aggr_func!("scipystatsnormpdf", 2, ScipyStatsNormPdfAccumulatorCreator); - register_aggr_func!("json_encode_path", 3, JsonPathEncodeFunctionCreator); + #[cfg(feature = "geo")] + register_aggr_func!( + "json_encode_path", + 3, + super::geo::encoding::JsonPathEncodeFunctionCreator + ); } }