From 5b46597dcd59370d46206a1f58d99a5c7684a5f8 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 5 Aug 2024 16:21:20 -0400 Subject: [PATCH] Move optimizer integration tests to `core_integration` --- datafusion/core/tests/core_integration.rs | 6 ++++++ .../mod.rs} | 0 .../aggregate_statistics.rs} | 0 .../core/tests/physical_optimizer/mod.rs | 18 ++++++++++++++++++ .../src/aggregate_statistics.rs | 2 ++ 5 files changed, 26 insertions(+) rename datafusion/core/tests/{optimizer_integration.rs => optimizer/mod.rs} (100%) rename datafusion/core/tests/{physical_optimizer_integration.rs => physical_optimizer/aggregate_statistics.rs} (100%) create mode 100644 datafusion/core/tests/physical_optimizer/mod.rs diff --git a/datafusion/core/tests/core_integration.rs b/datafusion/core/tests/core_integration.rs index deb5280388f1..79e5056e3cf5 100644 --- a/datafusion/core/tests/core_integration.rs +++ b/datafusion/core/tests/core_integration.rs @@ -36,6 +36,12 @@ mod memory_limit; /// Run all tests that are found in the `custom_sources_cases` directory mod custom_sources_cases; +/// Run all tests that are found in the `optimizer` directory +mod optimizer; + +/// Run all tests that are found in the `physical_optimizer` directory +mod physical_optimizer; + #[cfg(test)] #[ctor::ctor] fn init() { diff --git a/datafusion/core/tests/optimizer_integration.rs b/datafusion/core/tests/optimizer/mod.rs similarity index 100% rename from datafusion/core/tests/optimizer_integration.rs rename to datafusion/core/tests/optimizer/mod.rs diff --git a/datafusion/core/tests/physical_optimizer_integration.rs b/datafusion/core/tests/physical_optimizer/aggregate_statistics.rs similarity index 100% rename from datafusion/core/tests/physical_optimizer_integration.rs rename to datafusion/core/tests/physical_optimizer/aggregate_statistics.rs diff --git a/datafusion/core/tests/physical_optimizer/mod.rs b/datafusion/core/tests/physical_optimizer/mod.rs new file mode 100644 index 000000000000..0ee89a3d213c --- /dev/null +++ b/datafusion/core/tests/physical_optimizer/mod.rs @@ -0,0 +1,18 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +mod aggregate_statistics; diff --git a/datafusion/physical-optimizer/src/aggregate_statistics.rs b/datafusion/physical-optimizer/src/aggregate_statistics.rs index 0ce92df393aa..66b250c5063b 100644 --- a/datafusion/physical-optimizer/src/aggregate_statistics.rs +++ b/datafusion/physical-optimizer/src/aggregate_statistics.rs @@ -296,3 +296,5 @@ fn is_max(agg_expr: &dyn AggregateExpr) -> bool { } false } + +// See tests in datafusion/core/tests/physical_optimizer