diff --git a/datafusion-examples/examples/json_opener.rs b/datafusion-examples/examples/json_opener.rs index 1a3dbe57be75..a0d272c9164b 100644 --- a/datafusion-examples/examples/json_opener.rs +++ b/datafusion-examples/examples/json_opener.rs @@ -29,7 +29,7 @@ use datafusion::{ error::Result, physical_plan::metrics::ExecutionPlanMetricsSet, }; -use datafusion_common::Statistics; +use datafusion_statistics::Statistics use futures::StreamExt; use object_store::ObjectStore; diff --git a/datafusion/core/src/datasource/file_format/arrow.rs b/datafusion/core/src/datasource/file_format/arrow.rs index a9bd7d0e27bb..45d896488076 100644 --- a/datafusion/core/src/datasource/file_format/arrow.rs +++ b/datafusion/core/src/datasource/file_format/arrow.rs @@ -35,8 +35,9 @@ use arrow::ipc::root_as_message; use arrow_schema::{ArrowError, Schema, SchemaRef}; use bytes::Bytes; -use datafusion_common::{FileType, Statistics}; +use datafusion_common::FileType; use datafusion_physical_expr::PhysicalExpr; +use datafusion_statistics::Statistics; use async_trait::async_trait; use futures::stream::BoxStream; diff --git a/datafusion/core/src/datasource/file_format/csv.rs b/datafusion/core/src/datasource/file_format/csv.rs index 5f2084bc80a8..6c49baa4ca28 100644 --- a/datafusion/core/src/datasource/file_format/csv.rs +++ b/datafusion/core/src/datasource/file_format/csv.rs @@ -610,10 +610,10 @@ mod tests { use chrono::DateTime; use datafusion_common::cast::as_string_array; use datafusion_common::internal_err; - use datafusion_common::stats::Precision; use datafusion_common::FileType; use datafusion_common::GetExt; use datafusion_expr::{col, lit}; + use datafusion_statistics::Precision; use futures::StreamExt; use object_store::local::LocalFileSystem; use object_store::path::Path; diff --git a/datafusion/core/src/datasource/file_format/json.rs b/datafusion/core/src/datasource/file_format/json.rs index 70cfd1836efe..6d11bfaeda5f 100644 --- a/datafusion/core/src/datasource/file_format/json.rs +++ b/datafusion/core/src/datasource/file_format/json.rs @@ -356,7 +356,7 @@ impl DataSink for JsonSink { mod tests { use super::super::test_util::scan_format; use datafusion_common::cast::as_int64_array; - use datafusion_common::stats::Precision; + use datafusion_statistics::Precision; use futures::StreamExt; use object_store::local::LocalFileSystem; diff --git a/datafusion/core/src/datasource/file_format/parquet.rs b/datafusion/core/src/datasource/file_format/parquet.rs index 2cba474e559e..72de64c03d3b 100644 --- a/datafusion/core/src/datasource/file_format/parquet.rs +++ b/datafusion/core/src/datasource/file_format/parquet.rs @@ -19,8 +19,8 @@ use arrow_array::RecordBatch; use async_trait::async_trait; -use datafusion_common::stats::Precision; use datafusion_physical_plan::metrics::MetricsSet; +use datafusion_statistics::Precision; use parquet::arrow::arrow_writer::{ compute_leaves, get_column_writers, ArrowColumnChunk, ArrowColumnWriter, ArrowLeafColumn, diff --git a/datafusion/core/src/datasource/listing/table.rs b/datafusion/core/src/datasource/listing/table.rs index d26d417bd8b2..f1c658c6d39e 100644 --- a/datafusion/core/src/datasource/listing/table.rs +++ b/datafusion/core/src/datasource/listing/table.rs @@ -1040,9 +1040,9 @@ mod tests { use arrow::datatypes::{DataType, Schema}; use arrow::record_batch::RecordBatch; - use datafusion_common::stats::Precision; use datafusion_common::{assert_contains, GetExt, ScalarValue}; use datafusion_expr::{BinaryExpr, LogicalPlanBuilder, Operator}; + use datafusion_statistics::Precision; use rstest::*; use tempfile::TempDir; diff --git a/datafusion/core/src/datasource/physical_plan/arrow_file.rs b/datafusion/core/src/datasource/physical_plan/arrow_file.rs index 30b55db28491..7f09fa7b5145 100644 --- a/datafusion/core/src/datasource/physical_plan/arrow_file.rs +++ b/datafusion/core/src/datasource/physical_plan/arrow_file.rs @@ -30,9 +30,9 @@ use crate::physical_plan::{ }; use arrow_schema::SchemaRef; -use datafusion_common::Statistics; use datafusion_execution::TaskContext; use datafusion_physical_expr::{EquivalenceProperties, LexOrdering, PhysicalSortExpr}; +use datafusion_statistics::Statistics; use futures::StreamExt; use object_store::{GetResultPayload, ObjectStore}; diff --git a/datafusion/core/src/datasource/physical_plan/file_scan_config.rs b/datafusion/core/src/datasource/physical_plan/file_scan_config.rs index 3efb0df9df7c..3b70c1cb0687 100644 --- a/datafusion/core/src/datasource/physical_plan/file_scan_config.rs +++ b/datafusion/core/src/datasource/physical_plan/file_scan_config.rs @@ -38,9 +38,10 @@ use arrow::buffer::Buffer; use arrow::datatypes::{ArrowNativeType, UInt16Type}; use arrow_array::{ArrayRef, DictionaryArray, RecordBatch, RecordBatchOptions}; use arrow_schema::{DataType, Field, Schema, SchemaRef}; -use datafusion_common::stats::Precision; -use datafusion_common::{exec_err, ColumnStatistics, Statistics}; +use datafusion_common::exec_err; use datafusion_physical_expr::LexOrdering; +use datafusion_statistics::Precision; +use datafusion_statistics::{ColumnStatistics, Statistics}; use itertools::Itertools; use log::warn; diff --git a/datafusion/core/src/datasource/physical_plan/file_stream.rs b/datafusion/core/src/datasource/physical_plan/file_stream.rs index a715f6e8e3cd..b4c4daea4ef0 100644 --- a/datafusion/core/src/datasource/physical_plan/file_stream.rs +++ b/datafusion/core/src/datasource/physical_plan/file_stream.rs @@ -521,7 +521,7 @@ mod tests { use arrow_schema::Schema; use datafusion_common::internal_err; use datafusion_common::DataFusionError; - use datafusion_common::Statistics; + use datafusion_statistics::Statistics; use super::*; use crate::datasource::file_format::write::BatchSerializer; diff --git a/datafusion/core/src/datasource/physical_plan/mod.rs b/datafusion/core/src/datasource/physical_plan/mod.rs index ea0a9698ff5c..501d23247c2c 100644 --- a/datafusion/core/src/datasource/physical_plan/mod.rs +++ b/datafusion/core/src/datasource/physical_plan/mod.rs @@ -802,7 +802,7 @@ mod tests { /// Unit tests for `repartition_file_groups()` #[cfg(feature = "parquet")] mod repartition_file_groups_test { - use datafusion_common::Statistics; + use datafusion_statistics::Statistics; use itertools::Itertools; use super::*; diff --git a/datafusion/core/src/datasource/provider.rs b/datafusion/core/src/datasource/provider.rs index 7d9f9e86d603..8be8be5ffa63 100644 --- a/datafusion/core/src/datasource/provider.rs +++ b/datafusion/core/src/datasource/provider.rs @@ -21,9 +21,10 @@ use std::any::Any; use std::sync::Arc; use async_trait::async_trait; -use datafusion_common::{not_impl_err, Constraints, DataFusionError, Statistics}; +use datafusion_common::{not_impl_err, Constraints, DataFusionError}; use datafusion_expr::{CreateExternalTable, LogicalPlan}; pub use datafusion_expr::{TableProviderFilterPushDown, TableType}; +use datafusion_statistics::Statistics; use crate::arrow::datatypes::SchemaRef; use crate::error::Result; diff --git a/datafusion/core/src/datasource/statistics.rs b/datafusion/core/src/datasource/statistics.rs index 3d8248dfdeb2..571b4c532c52 100644 --- a/datafusion/core/src/datasource/statistics.rs +++ b/datafusion/core/src/datasource/statistics.rs @@ -21,8 +21,8 @@ use crate::error::Result; use crate::physical_plan::expressions::{MaxAccumulator, MinAccumulator}; use crate::physical_plan::{Accumulator, ColumnStatistics, Statistics}; -use datafusion_common::stats::Precision; use datafusion_common::ScalarValue; +use datafusion_statistics::Precision; use futures::{Stream, StreamExt}; use itertools::izip; diff --git a/datafusion/core/src/physical_optimizer/aggregate_statistics.rs b/datafusion/core/src/physical_optimizer/aggregate_statistics.rs index 43def5d73f73..4e489b2e880c 100644 --- a/datafusion/core/src/physical_optimizer/aggregate_statistics.rs +++ b/datafusion/core/src/physical_optimizer/aggregate_statistics.rs @@ -27,9 +27,9 @@ use crate::physical_plan::projection::ProjectionExec; use crate::physical_plan::{expressions, AggregateExpr, ExecutionPlan, Statistics}; use crate::scalar::ScalarValue; -use datafusion_common::stats::Precision; use datafusion_common::tree_node::TreeNode; use datafusion_expr::utils::COUNT_STAR_EXPANSION; +use datafusion_statistics::Precision; /// Optimizer that uses available statistics for aggregate functions #[derive(Default)] diff --git a/datafusion/core/src/physical_optimizer/join_selection.rs b/datafusion/core/src/physical_optimizer/join_selection.rs index 876a464257cc..a4eddc4fd1a9 100644 --- a/datafusion/core/src/physical_optimizer/join_selection.rs +++ b/datafusion/core/src/physical_optimizer/join_selection.rs @@ -601,9 +601,10 @@ mod tests_statistical { }; use arrow::datatypes::{DataType, Field, Schema}; - use datafusion_common::{stats::Precision, JoinType, ScalarValue}; + use datafusion_common::{JoinType, ScalarValue}; use datafusion_physical_expr::expressions::Column; use datafusion_physical_expr::PhysicalExpr; + use datafusion_statistics::Precision; fn create_big_and_small() -> (Arc, Arc) { let big = Arc::new(StatisticsExec::new( diff --git a/datafusion/core/src/physical_optimizer/output_requirements.rs b/datafusion/core/src/physical_optimizer/output_requirements.rs index d9cdc292dd56..62df3ad81133 100644 --- a/datafusion/core/src/physical_optimizer/output_requirements.rs +++ b/datafusion/core/src/physical_optimizer/output_requirements.rs @@ -31,11 +31,12 @@ use crate::physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan}; use arrow_schema::SchemaRef; use datafusion_common::config::ConfigOptions; use datafusion_common::tree_node::{Transformed, TreeNode}; -use datafusion_common::{Result, Statistics}; +use datafusion_common::Result; use datafusion_physical_expr::{ Distribution, LexRequirement, PhysicalSortExpr, PhysicalSortRequirement, }; use datafusion_physical_plan::sorts::sort_preserving_merge::SortPreservingMergeExec; +use datafusion_statistics::Statistics; /// This rule either adds or removes [`OutputRequirements`]s to/from the physical /// plan according to its `mode` attribute, which is set by the constructors diff --git a/datafusion/core/src/physical_optimizer/replace_with_order_preserving_variants.rs b/datafusion/core/src/physical_optimizer/replace_with_order_preserving_variants.rs index 0c2f21d11acd..f317706b8921 100644 --- a/datafusion/core/src/physical_optimizer/replace_with_order_preserving_variants.rs +++ b/datafusion/core/src/physical_optimizer/replace_with_order_preserving_variants.rs @@ -291,11 +291,12 @@ mod tests { use arrow::compute::SortOptions; use arrow::datatypes::{DataType, Field, Schema, SchemaRef}; use datafusion_common::tree_node::TreeNode; - use datafusion_common::{Result, Statistics}; + use datafusion_common::Result; use datafusion_execution::object_store::ObjectStoreUrl; use datafusion_expr::{JoinType, Operator}; use datafusion_physical_expr::expressions::{self, col, Column}; use datafusion_physical_expr::PhysicalSortExpr; + use datafusion_statistics::Statistics; /// Runs the `replace_with_order_preserving_variants` sub-rule and asserts the plan /// against the original and expected plans. diff --git a/datafusion/core/src/physical_optimizer/test_utils.rs b/datafusion/core/src/physical_optimizer/test_utils.rs index 159ee5089075..25f286e29fd9 100644 --- a/datafusion/core/src/physical_optimizer/test_utils.rs +++ b/datafusion/core/src/physical_optimizer/test_utils.rs @@ -39,12 +39,13 @@ use crate::physical_plan::{ExecutionPlan, Partitioning}; use crate::prelude::{CsvReadOptions, SessionContext}; use arrow_schema::{Schema, SchemaRef, SortOptions}; -use datafusion_common::{JoinType, Statistics}; +use datafusion_common::JoinType; use datafusion_execution::object_store::ObjectStoreUrl; use datafusion_expr::{AggregateFunction, WindowFrame, WindowFunction}; use datafusion_physical_expr::expressions::col; use datafusion_physical_expr::{PhysicalExpr, PhysicalSortExpr}; use datafusion_physical_plan::windows::PartitionSearchMode; +use datafusion_statistics::Statistics; use async_trait::async_trait; diff --git a/datafusion/core/src/test/mod.rs b/datafusion/core/src/test/mod.rs index aad5c19044ea..6911e00fd020 100644 --- a/datafusion/core/src/test/mod.rs +++ b/datafusion/core/src/test/mod.rs @@ -40,10 +40,11 @@ use crate::test_util::{aggr_test_schema, arrow_test_data}; use arrow::array::{self, Array, ArrayRef, Decimal128Builder, Int32Array}; use arrow::datatypes::{DataType, Field, Schema, SchemaRef}; use arrow::record_batch::RecordBatch; -use datafusion_common::{DataFusionError, FileType, Statistics}; +use datafusion_common::{DataFusionError, FileType}; use datafusion_execution::{SendableRecordBatchStream, TaskContext}; use datafusion_physical_expr::{Partitioning, PhysicalSortExpr}; use datafusion_physical_plan::{DisplayAs, DisplayFormatType}; +use datafusion_statistics::Statistics; #[cfg(feature = "compression")] use bzip2::write::BzEncoder; diff --git a/datafusion/core/src/test_util/parquet.rs b/datafusion/core/src/test_util/parquet.rs index 0d11526703b4..c2cdebdb34cf 100644 --- a/datafusion/core/src/test_util/parquet.rs +++ b/datafusion/core/src/test_util/parquet.rs @@ -36,7 +36,7 @@ use crate::physical_plan::metrics::MetricsSet; use crate::physical_plan::ExecutionPlan; use crate::prelude::{Expr, SessionConfig}; -use datafusion_common::Statistics; +use datafusion_statistics::Statistics; use object_store::path::Path; use object_store::ObjectMeta; diff --git a/datafusion/core/tests/custom_sources.rs b/datafusion/core/tests/custom_sources.rs index daf1ef41a297..adf25746a4fb 100644 --- a/datafusion/core/tests/custom_sources.rs +++ b/datafusion/core/tests/custom_sources.rs @@ -39,7 +39,7 @@ use datafusion::physical_plan::{ use datafusion::scalar::ScalarValue; use datafusion_common::cast::as_primitive_array; use datafusion_common::project_schema; -use datafusion_common::stats::Precision; +use datafusion_statistics::Precision; use async_trait::async_trait; use futures::stream::Stream; diff --git a/datafusion/core/tests/parquet/file_statistics.rs b/datafusion/core/tests/parquet/file_statistics.rs index 1ea154303d69..872b02ae93e6 100644 --- a/datafusion/core/tests/parquet/file_statistics.rs +++ b/datafusion/core/tests/parquet/file_statistics.rs @@ -26,7 +26,6 @@ use datafusion::datasource::physical_plan::ParquetExec; use datafusion::datasource::TableProvider; use datafusion::execution::context::SessionState; use datafusion::prelude::SessionContext; -use datafusion_common::stats::Precision; use datafusion_execution::cache::cache_manager::CacheManagerConfig; use datafusion_execution::cache::cache_unit; use datafusion_execution::cache::cache_unit::{ @@ -34,6 +33,7 @@ use datafusion_execution::cache::cache_unit::{ }; use datafusion_execution::config::SessionConfig; use datafusion_execution::runtime_env::{RuntimeConfig, RuntimeEnv}; +use datafusion_statistics::Precision; use tempfile::tempdir; diff --git a/datafusion/core/tests/path_partition.rs b/datafusion/core/tests/path_partition.rs index 27d146de798d..5b816f1ae1a9 100644 --- a/datafusion/core/tests/path_partition.rs +++ b/datafusion/core/tests/path_partition.rs @@ -36,8 +36,8 @@ use datafusion::{ prelude::SessionContext, test_util::{self, arrow_test_data, parquet_test_data}, }; -use datafusion_common::stats::Precision; use datafusion_common::ScalarValue; +use datafusion_statistics::Precision; use async_trait::async_trait; use bytes::Bytes; diff --git a/datafusion/execution/src/cache/cache_unit.rs b/datafusion/execution/src/cache/cache_unit.rs index d435810a93c4..d5ab1a6dc0d5 100644 --- a/datafusion/execution/src/cache/cache_unit.rs +++ b/datafusion/execution/src/cache/cache_unit.rs @@ -163,7 +163,7 @@ mod tests { use crate::cache::CacheAccessor; use arrow::datatypes::{DataType, Field, Schema, TimeUnit}; use chrono::DateTime; - use datafusion_common::Statistics; + use datafusion_statistics::Statistics; use object_store::path::Path; use object_store::ObjectMeta; diff --git a/datafusion/physical-plan/src/joins/nested_loop_join.rs b/datafusion/physical-plan/src/joins/nested_loop_join.rs index ad7deb797284..747f85ca43ac 100644 --- a/datafusion/physical-plan/src/joins/nested_loop_join.rs +++ b/datafusion/physical-plan/src/joins/nested_loop_join.rs @@ -50,7 +50,7 @@ use datafusion_execution::TaskContext; use datafusion_expr::JoinType; use datafusion_physical_expr::equivalence::join_equivalence_properties; use datafusion_physical_expr::{EquivalenceProperties, PhysicalSortExpr}; -use datafusion_statstics::Statistics; +use datafusion_statistics::Statistics; use futures::{ready, Stream, StreamExt, TryStreamExt}; diff --git a/datafusion/physical-plan/src/joins/utils.rs b/datafusion/physical-plan/src/joins/utils.rs index c91dc92fbc7a..8f24dbddc1fc 100644 --- a/datafusion/physical-plan/src/joins/utils.rs +++ b/datafusion/physical-plan/src/joins/utils.rs @@ -35,7 +35,6 @@ use arrow::compute; use arrow::datatypes::{Field, Schema, SchemaBuilder}; use arrow::record_batch::{RecordBatch, RecordBatchOptions}; use datafusion_common::cast::as_boolean_array; -use datafusion_common::stats::Precision; use datafusion_common::{ plan_datafusion_err, plan_err, DataFusionError, JoinSide, JoinType, Result, SharedResult, @@ -47,6 +46,7 @@ use datafusion_physical_expr::utils::merge_vectors; use datafusion_physical_expr::{ LexOrdering, LexOrderingRef, PhysicalExpr, PhysicalSortExpr, }; +use datafusion_statistics::Precision; use futures::future::{BoxFuture, Shared}; use futures::{ready, FutureExt}; diff --git a/datafusion/physical-plan/src/lib.rs b/datafusion/physical-plan/src/lib.rs index 9519f6a5a1dd..94261edc5f43 100644 --- a/datafusion/physical-plan/src/lib.rs +++ b/datafusion/physical-plan/src/lib.rs @@ -77,13 +77,14 @@ pub use crate::visitor::{accept, visit_execution_plan, ExecutionPlanVisitor}; use datafusion_common::config::ConfigOptions; pub use datafusion_common::hash_utils; +pub use datafusion_common::internal_err; pub use datafusion_common::utils::project_schema; -pub use datafusion_common::{internal_err, ColumnStatistics, Statistics}; pub use datafusion_expr::{Accumulator, ColumnarValue}; pub use datafusion_physical_expr::window::WindowExpr; pub use datafusion_physical_expr::{ expressions, functions, udf, AggregateExpr, Distribution, Partitioning, PhysicalExpr, }; +pub use datafusion_statistics::{ColumnStatistics, Statistics}; // Backwards compatibility pub use crate::stream::EmptyRecordBatchStream; diff --git a/datafusion/physical-plan/src/limit.rs b/datafusion/physical-plan/src/limit.rs index c8427f9bc2c6..8ed09f0a9909 100644 --- a/datafusion/physical-plan/src/limit.rs +++ b/datafusion/physical-plan/src/limit.rs @@ -32,9 +32,9 @@ use crate::{ use arrow::array::ArrayRef; use arrow::datatypes::SchemaRef; use arrow::record_batch::{RecordBatch, RecordBatchOptions}; -use datafusion_common::stats::Precision; use datafusion_common::{internal_err, DataFusionError, Result}; use datafusion_execution::TaskContext; +use datafusion_statistics::Precision; use futures::stream::{Stream, StreamExt}; use log::trace; diff --git a/datafusion/physical-plan/src/projection.rs b/datafusion/physical-plan/src/projection.rs index c5d94b08e0e1..e4a5f1ac4226 100644 --- a/datafusion/physical-plan/src/projection.rs +++ b/datafusion/physical-plan/src/projection.rs @@ -35,11 +35,11 @@ use crate::{ use arrow::datatypes::{Field, Schema, SchemaRef}; use arrow::record_batch::{RecordBatch, RecordBatchOptions}; -use datafusion_common::stats::Precision; use datafusion_common::Result; use datafusion_execution::TaskContext; use datafusion_physical_expr::expressions::{Literal, UnKnownColumn}; use datafusion_physical_expr::EquivalenceProperties; +use datafusion_statistics::Precision; use datafusion_physical_expr::equivalence::ProjectionMapping; use futures::stream::{Stream, StreamExt}; diff --git a/datafusion/physical-plan/src/union.rs b/datafusion/physical-plan/src/union.rs index 9700605ce406..179ce8627c2a 100644 --- a/datafusion/physical-plan/src/union.rs +++ b/datafusion/physical-plan/src/union.rs @@ -37,10 +37,10 @@ use crate::stream::ObservedStream; use arrow::datatypes::{Field, Schema, SchemaRef}; use arrow::record_batch::RecordBatch; -use datafusion_common::stats::Precision; use datafusion_common::{exec_err, internal_err, DFSchemaRef, DataFusionError, Result}; use datafusion_execution::TaskContext; use datafusion_physical_expr::EquivalenceProperties; +use datafusion_statistics::Precision; use futures::Stream; use itertools::Itertools; diff --git a/datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs b/datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs index fb679b013863..53a7e62c33e9 100644 --- a/datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs +++ b/datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs @@ -45,7 +45,6 @@ use arrow::{ record_batch::RecordBatch, }; use datafusion_common::hash_utils::create_hashes; -use datafusion_common::stats::Precision; use datafusion_common::utils::{ evaluate_partition_ranges, get_arrayref_at_indices, get_at_indices, get_record_batch_at_indices, get_row_at_idx, @@ -60,6 +59,7 @@ use datafusion_physical_expr::window::{ use datafusion_physical_expr::{ EquivalenceProperties, PhysicalExpr, PhysicalSortRequirement, }; +use datafusion_statistics::Precision; use ahash::RandomState; use futures::stream::Stream; diff --git a/datafusion/physical-plan/src/windows/window_agg_exec.rs b/datafusion/physical-plan/src/windows/window_agg_exec.rs index 6c245f65ba4f..1de056240688 100644 --- a/datafusion/physical-plan/src/windows/window_agg_exec.rs +++ b/datafusion/physical-plan/src/windows/window_agg_exec.rs @@ -43,11 +43,11 @@ use arrow::{ datatypes::{Schema, SchemaRef}, record_batch::RecordBatch, }; -use datafusion_common::stats::Precision; use datafusion_common::utils::evaluate_partition_ranges; use datafusion_common::{internal_err, plan_err, DataFusionError, Result}; use datafusion_execution::TaskContext; use datafusion_physical_expr::{EquivalenceProperties, PhysicalSortRequirement}; +use datafusion_statistics::Precision; use futures::stream::Stream; use futures::{ready, StreamExt}; diff --git a/datafusion/proto/src/physical_plan/from_proto.rs b/datafusion/proto/src/physical_plan/from_proto.rs index a956eded9032..a9ced38b58ff 100644 --- a/datafusion/proto/src/physical_plan/from_proto.rs +++ b/datafusion/proto/src/physical_plan/from_proto.rs @@ -39,8 +39,8 @@ use datafusion::physical_plan::windows::create_window_expr; use datafusion::physical_plan::{ functions, ColumnStatistics, Partitioning, PhysicalExpr, Statistics, WindowExpr, }; -use datafusion_common::stats::Precision; use datafusion_common::{not_impl_err, DataFusionError, JoinSide, Result, ScalarValue}; +use datafusion_statistics::Precision; use crate::common::proto_error; use crate::convert_required; diff --git a/datafusion/proto/tests/cases/roundtrip_physical_plan.rs b/datafusion/proto/tests/cases/roundtrip_physical_plan.rs index 01a0916d8cd2..02ef0e860c7b 100644 --- a/datafusion/proto/tests/cases/roundtrip_physical_plan.rs +++ b/datafusion/proto/tests/cases/roundtrip_physical_plan.rs @@ -53,7 +53,6 @@ use datafusion::physical_plan::{ }; use datafusion::prelude::SessionContext; use datafusion::scalar::ScalarValue; -use datafusion_common::stats::Precision; use datafusion_common::Result; use datafusion_expr::{ Accumulator, AccumulatorFactoryFunction, AggregateUDF, ReturnTypeFunction, Signature, @@ -61,6 +60,7 @@ use datafusion_expr::{ }; use datafusion_proto::physical_plan::{AsExecutionPlan, DefaultPhysicalExtensionCodec}; use datafusion_proto::protobuf; +use datafusion_statistics::Precision; fn roundtrip_test(exec_plan: Arc) -> Result<()> { let ctx = SessionContext::new(); diff --git a/datafusion/statistics/README.md b/datafusion/statistics/README.md new file mode 100644 index 000000000000..f51e3c56992d --- /dev/null +++ b/datafusion/statistics/README.md @@ -0,0 +1,26 @@ + + +# DataFusion Statistics + +[DataFusion][df] is an extensible query execution framework, written in Rust, that uses Apache Arrow as its in-memory format. + +This crate is a submodule of DataFusion that provides statistics, interval analysis to support query optimization. + +[df]: https://crates.io/crates/datafusion