Skip to content

Commit 15319d6

Browse files
committed
condition on debug_assertions instead of FF
it's a bit of FF misuse
1 parent 86d1dac commit 15319d6

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/expr/src/udf.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,13 @@ impl ScalarUDF {
233233
///
234234
/// See [`ScalarUDFImpl::invoke_with_args`] for details.
235235
pub fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> {
236-
#[cfg(feature = "integration-tests")]
236+
#[cfg(debug_assertions)]
237237
let return_field = Arc::clone(&args.return_field);
238238
match self.inner.invoke_with_args(args) {
239239
Ok(value) => {
240240
// Maybe this could be enabled always?
241-
#[cfg(feature = "integration-tests")]
241+
// This doesn't use debug_assert!, but it's meant to run anywhere except on production, so it's same in spirit, so conditioning on debug_assertions.
242+
#[cfg(debug_assertions)]
242243
if &value.data_type() != return_field.data_type() {
243244
return datafusion_common::exec_err!("Function '{}' returned value of type '{:?}' while the following type was promised at planning time and expected: '{:?}'",
244245
self.name(),

datafusion/sqllogictest/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ bytes = { workspace = true, optional = true }
4444
chrono = { workspace = true, optional = true }
4545
clap = { version = "4.5.47", features = ["derive", "env"] }
4646
datafusion = { workspace = true, default-features = true, features = ["avro", "parquet_encryption"] }
47-
# integration-tests feature enables additional assertions within the production code
48-
datafusion-expr = { workspace = true, features = ["integration-tests"] }
4947
datafusion-spark = { workspace = true, default-features = true }
5048
datafusion-substrait = { workspace = true, default-features = true }
5149
futures = { workspace = true }

0 commit comments

Comments
 (0)