Skip to content

Apache DataFusion SQL Query Engine

Move optimizer integration tests to `core_integration` (#11830)

Andrew Lamb537774ec1d96
diff --git a/datafusion/core/tests/core_integration.rs b/datafusion/core/tests/core_integration.rs
index deb5280388..79e5056e3c 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 0000000000..0ee89a3d21
--- /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 0ce92df393..66b250c506 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