Skip to content

Apache DataFusion SQL Query Engine

test: correct feature gating of two datafusion-common tests (#23044)

Phoenixefc7b3e0f19f
diff --git a/datafusion/common/src/hash_utils.rs b/datafusion/common/src/hash_utils.rs
index e9c4c26e37..1443b6152b 100644
--- a/datafusion/common/src/hash_utils.rs
+++ b/datafusion/common/src/hash_utils.rs
@@ -1853,6 +1853,7 @@ mod tests {
}
#[test]
+ #[cfg(not(feature = "force_hash_collisions"))]
fn test_create_hashes_with_quality_hash_state() {
let int_array: ArrayRef = Arc::new(Int32Array::from(vec![1, 2, 3, 4]));
let str_array: ArrayRef = Arc::new(StringArray::from(vec!["a", "b", "c", "d"]));
diff --git a/datafusion/common/src/utils/mod.rs b/datafusion/common/src/utils/mod.rs
index 12b3f44fe7..041cb1aa0b 100644
--- a/datafusion/common/src/utils/mod.rs
+++ b/datafusion/common/src/utils/mod.rs
@@ -1486,6 +1486,7 @@ mod tests {
buffer::NullBuffer,
datatypes::Int32Type,
};
+ #[cfg(feature = "sql")]
use sqlparser::ast::Ident;
#[test]