This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 8dafc37a74 Minor: Add ticket reference and add test comment (#7593)
8dafc37a74 is described below

commit 8dafc37a749765da3ea21244ccac168d69dde9f9
Author: Andrew Lamb <[email protected]>
AuthorDate: Thu Sep 28 12:52:55 2023 -0400

    Minor: Add ticket reference and add test comment (#7593)
---
 datafusion/core/tests/sql/mod.rs                   | 3 +++
 datafusion/optimizer/src/analyzer/type_coercion.rs | 1 +
 2 files changed, 4 insertions(+)

diff --git a/datafusion/core/tests/sql/mod.rs b/datafusion/core/tests/sql/mod.rs
index 522cdce1a4..7d175b6526 100644
--- a/datafusion/core/tests/sql/mod.rs
+++ b/datafusion/core/tests/sql/mod.rs
@@ -635,6 +635,9 @@ pub fn make_partition(sz: i32) -> RecordBatch {
 
 /// Specialised String representation
 fn col_str(column: &ArrayRef, row_index: usize) -> String {
+    // NullArray::is_null() does not work on NullArray.
+    // can remove check for DataType::Null when
+    // https://github.com/apache/arrow-rs/issues/4835 is fixed
     if column.data_type() == &DataType::Null || column.is_null(row_index) {
         return "NULL".to_string();
     }
diff --git a/datafusion/optimizer/src/analyzer/type_coercion.rs 
b/datafusion/optimizer/src/analyzer/type_coercion.rs
index f976a3468d..5e239f8e99 100644
--- a/datafusion/optimizer/src/analyzer/type_coercion.rs
+++ b/datafusion/optimizer/src/analyzer/type_coercion.rs
@@ -881,6 +881,7 @@ mod test {
 
     #[test]
     fn scalar_function() -> Result<()> {
+        // test that automatic argument type coercion for scalar functions work
         let empty = empty();
         let lit_expr = lit(10i64);
         let fun: BuiltinScalarFunction = BuiltinScalarFunction::Acos;

Reply via email to