Apache DataFusion SQL Query Engine
minor: combine datafusion-ffi test binaries into ffi_integration (#26423)
Andrew Lamb894c2d323bfd
diff --git a/datafusion/ffi/tests/ffi_catalog.rs b/datafusion/ffi/tests/cases/catalog.rssimilarity index 88%rename from datafusion/ffi/tests/ffi_catalog.rsrename to datafusion/ffi/tests/cases/catalog.rsindex 440a435f75..5493c9f32d 100644--- a/datafusion/ffi/tests/ffi_catalog.rs+++ b/datafusion/ffi/tests/cases/catalog.rs@@ -15,11 +15,6 @@// specific language governing permissions and limitations// under the License.-mod utils;--/// Add an additional module here for convenience to scope this to only-/// when the feature integration-tests is built-#[cfg(feature = "integration-tests")]mod tests {use std::sync::Arc;@@ -29,7 +24,7 @@ mod tests {#[tokio::test]async fn test_catalog() -> datafusion_common::Result<()> {let module = get_module()?;- let (ctx, codec) = super::utils::ctx_and_codec();+ let (ctx, codec) = crate::utils::ctx_and_codec();let ffi_catalog = (module.create_catalog)(codec);let foreign_catalog: Arc<dyn CatalogProvider> = (&ffi_catalog).into();@@ -50,7 +45,7 @@ mod tests {#[tokio::test]async fn test_catalog_list() -> datafusion_common::Result<()> {let module = get_module()?;- let (ctx, codec) = super::utils::ctx_and_codec();+ let (ctx, codec) = crate::utils::ctx_and_codec();let ffi_catalog_list = (module.create_catalog_list)(codec);let foreign_catalog_list: Arc<dyn CatalogProviderList> =diff --git a/datafusion/ffi/tests/ffi_config.rs b/datafusion/ffi/tests/cases/config.rssimilarity index 96%rename from datafusion/ffi/tests/ffi_config.rsrename to datafusion/ffi/tests/cases/config.rsindex 4e5ad56722..66a0573e4b 100644--- a/datafusion/ffi/tests/ffi_config.rs+++ b/datafusion/ffi/tests/cases/config.rs@@ -15,9 +15,6 @@// specific language governing permissions and limitations// under the License.-/// Add an additional module here for convenience to scope this to only-/// when the feature integration-tests is built-#[cfg(feature = "integration-tests")]mod tests {use datafusion::error::Result;use datafusion_common::ScalarValue;diff --git a/datafusion/ffi/tests/ffi_execution_plan.rs b/datafusion/ffi/tests/cases/execution_plan.rssimilarity index 99%rename from datafusion/ffi/tests/ffi_execution_plan.rsrename to datafusion/ffi/tests/cases/execution_plan.rsindex 6b2cbc380f..bce4b3061f 100644--- a/datafusion/ffi/tests/ffi_execution_plan.rs+++ b/datafusion/ffi/tests/cases/execution_plan.rs@@ -15,7 +15,6 @@// specific language governing permissions and limitations// under the License.-#[cfg(feature = "integration-tests")]mod tests {use arrow::datatypes::Field;use arrow::datatypes::Schema;diff --git a/datafusion/ffi/tests/cases/mod.rs b/datafusion/ffi/tests/cases/mod.rsnew file mode 100644index 0000000000..b32a54af49--- /dev/null+++ b/datafusion/ffi/tests/cases/mod.rs@@ -0,0 +1,26 @@+// 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 catalog;+mod config;+mod execution_plan;+mod physical_optimizer;+mod query_planner;+mod udaf;+mod udf;+mod udtf;+mod udwf;diff --git a/datafusion/ffi/tests/ffi_physical_optimizer.rs b/datafusion/ffi/tests/cases/physical_optimizer.rssimilarity index 98%rename from datafusion/ffi/tests/ffi_physical_optimizer.rsrename to datafusion/ffi/tests/cases/physical_optimizer.rsindex d8baf52288..5787bab55a 100644--- a/datafusion/ffi/tests/ffi_physical_optimizer.rs+++ b/datafusion/ffi/tests/cases/physical_optimizer.rs@@ -15,7 +15,6 @@// specific language governing permissions and limitations// under the License.-#[cfg(feature = "integration-tests")]mod tests {use std::sync::Arc;diff --git a/datafusion/ffi/tests/ffi_query_planner.rs b/datafusion/ffi/tests/cases/query_planner.rssimilarity index 99%rename from datafusion/ffi/tests/ffi_query_planner.rsrename to datafusion/ffi/tests/cases/query_planner.rsindex c72b8c3e88..9cd3969eae 100644--- a/datafusion/ffi/tests/ffi_query_planner.rs+++ b/datafusion/ffi/tests/cases/query_planner.rs@@ -15,9 +15,6 @@// specific language governing permissions and limitations// under the License.-mod utils;--#[cfg(feature = "integration-tests")]mod tests {use std::sync::{Arc, OnceLock, Weak};diff --git a/datafusion/ffi/tests/ffi_udaf.rs b/datafusion/ffi/tests/cases/udaf.rssimilarity index 97%rename from datafusion/ffi/tests/ffi_udaf.rsrename to datafusion/ffi/tests/cases/udaf.rsindex 090151416e..71aca901d0 100644--- a/datafusion/ffi/tests/ffi_udaf.rs+++ b/datafusion/ffi/tests/cases/udaf.rs@@ -15,9 +15,6 @@// specific language governing permissions and limitations// under the License.-/// Add an additional module here for convenience to scope this to only-/// when the feature integration-tests is built-#[cfg(feature = "integration-tests")]mod tests {use std::sync::Arc;diff --git a/datafusion/ffi/tests/ffi_udf.rs b/datafusion/ffi/tests/cases/udf.rssimilarity index 97%rename from datafusion/ffi/tests/ffi_udf.rsrename to datafusion/ffi/tests/cases/udf.rsindex f97153526f..adbc2a20cf 100644--- a/datafusion/ffi/tests/ffi_udf.rs+++ b/datafusion/ffi/tests/cases/udf.rs@@ -15,9 +15,6 @@// specific language governing permissions and limitations// under the License.-/// Add an additional module here for convenience to scope this to only-/// when the feature integration-tests is built-#[cfg(feature = "integration-tests")]mod tests {use arrow::array::{Array, AsArray, record_batch};use arrow::datatypes::DataType;diff --git a/datafusion/ffi/tests/ffi_udtf.rs b/datafusion/ffi/tests/cases/udtf.rssimilarity index 89%rename from datafusion/ffi/tests/ffi_udtf.rsrename to datafusion/ffi/tests/cases/udtf.rsindex d1215b331b..ac87f26bff 100644--- a/datafusion/ffi/tests/ffi_udtf.rs+++ b/datafusion/ffi/tests/cases/udtf.rs@@ -15,11 +15,6 @@// specific language governing permissions and limitations// under the License.-mod utils;--/// Add an additional module here for convenience to scope this to only-/// when the feature integration-tests is built-#[cfg(feature = "integration-tests")]mod tests {use std::sync::Arc;@@ -35,7 +30,7 @@ mod tests {#[tokio::test]async fn test_user_defined_table_function() -> Result<()> {let module = get_module()?;- let (ctx, codec) = super::utils::ctx_and_codec();+ let (ctx, codec) = crate::utils::ctx_and_codec();let ffi_table_func = (module.create_table_function)(codec);let foreign_table_func: Arc<dyn TableFunctionImpl> = ffi_table_func.into();diff --git a/datafusion/ffi/tests/ffi_udwf.rs b/datafusion/ffi/tests/cases/udwf.rssimilarity index 93%rename from datafusion/ffi/tests/ffi_udwf.rsrename to datafusion/ffi/tests/cases/udwf.rsindex 66f2621d5f..70369b2243 100644--- a/datafusion/ffi/tests/ffi_udwf.rs+++ b/datafusion/ffi/tests/cases/udwf.rs@@ -15,9 +15,6 @@// specific language governing permissions and limitations// under the License.-/// Add an additional module here for convenience to scope this to only-/// when the feature integration-tests is built-#[cfg(feature = "integration-tests")]mod tests {use std::sync::Arc;diff --git a/datafusion/ffi/tests/ffi_integration.rs b/datafusion/ffi/tests/ffi_integration.rsindex cba334e8fa..766ede2b2a 100644--- a/datafusion/ffi/tests/ffi_integration.rs+++ b/datafusion/ffi/tests/ffi_integration.rs@@ -17,6 +17,10 @@mod utils;+/// Run all tests that are found in the `cases` directory+#[cfg(feature = "integration-tests")]+mod cases;+/// Add an additional module here for convenience to scope this to only/// when the feature integration-tests is built#[cfg(feature = "integration-tests")]