From 4be985aebf934c9b77c36c7ee80abf600836fd49 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Wed, 4 Dec 2024 09:22:30 -0600 Subject: [PATCH] Add comment explaining DataType::Null --- datafusion/expr/src/expr_schema.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datafusion/expr/src/expr_schema.rs b/datafusion/expr/src/expr_schema.rs index b947c3f8500d..3317deafbd6c 100644 --- a/datafusion/expr/src/expr_schema.rs +++ b/datafusion/expr/src/expr_schema.rs @@ -218,6 +218,8 @@ impl ExprSchemable for Expr { if let Some(dtype) = data_type { Ok(dtype.clone()) } else { + // If the placeholder's type hasn't been specified, treat it as + // null (unspecified placeholders generate an error during planning) Ok(DataType::Null) } }