Skip to content

Commit

Permalink
fix: Fix compiler errors in query crate (#746)
Browse files Browse the repository at this point in the history
* fix: Fix compiler errors in state.rs

* fix: fix compiler errors in state

* feat: upgrade sqlparser to 0.26

* fix: fix datafusion engine compiler errors

* fix: Fix some tests in query crate

* fix: Fix all warnings in tests

* feat: Remove `Type` from timestamp's type name

* fix: fix query tests

Now datafusion already supports median, so this commit also remove the
median function

* style: Fix clippy

* feat: Remove RecordBatch::pretty_print

* chore: Address CR comments

* Update src/query/src/query_engine/state.rs

Co-authored-by: Ruihang Xia <[email protected]>
  • Loading branch information
evenyag and waynexia authored Dec 14, 2022
1 parent 652d59a commit dbb3034
Show file tree
Hide file tree
Showing 34 changed files with 351 additions and 890 deletions.
22 changes: 7 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/common/function/src/scalars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ pub(crate) mod test;
mod timestamp;
pub mod udf;

pub use aggregate::MedianAccumulatorCreator;
pub use function::{Function, FunctionRef};
pub use function_registry::{FunctionRegistry, FUNCTION_REGISTRY};
3 changes: 0 additions & 3 deletions src/common/function/src/scalars/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ mod argmax;
mod argmin;
mod diff;
mod mean;
mod median;
mod percentile;
mod polyval;
mod scipy_stats_norm_cdf;
Expand All @@ -29,7 +28,6 @@ pub use argmin::ArgminAccumulatorCreator;
use common_query::logical_plan::AggregateFunctionCreatorRef;
pub use diff::DiffAccumulatorCreator;
pub use mean::MeanAccumulatorCreator;
pub use median::MedianAccumulatorCreator;
pub use percentile::PercentileAccumulatorCreator;
pub use polyval::PolyvalAccumulatorCreator;
pub use scipy_stats_norm_cdf::ScipyStatsNormCdfAccumulatorCreator;
Expand Down Expand Up @@ -88,7 +86,6 @@ impl AggregateFunctions {
};
}

register_aggr_func!("median", 1, MedianAccumulatorCreator);
register_aggr_func!("diff", 1, DiffAccumulatorCreator);
register_aggr_func!("mean", 1, MeanAccumulatorCreator);
register_aggr_func!("polyval", 2, PolyvalAccumulatorCreator);
Expand Down
287 changes: 0 additions & 287 deletions src/common/function/src/scalars/aggregate/median.rs

This file was deleted.

Loading

0 comments on commit dbb3034

Please sign in to comment.