andygrove commented on code in PR #12308:
URL: https://github.com/apache/datafusion/pull/12308#discussion_r1742797386


##########
datafusion/core/src/dataframe/mod.rs:
##########
@@ -1803,6 +1803,17 @@ mod tests {
         Ok(())
     }
 
+    #[tokio::test]
+    async fn test_coalesce_schema() -> Result<()> {
+        let ctx = SessionContext::new();
+
+        let query = r#"SELECT COALESCE(null, 5)"#;

Review Comment:
   I tried a variation of this test and found another issue:
   
   ```
   let query = r#"SELECT COALESCE(column1, column2) FROM VALUES (null, 1.2)"#;
   ```
   
   failed with:
   
   ```
   Left:  Schema { fields: [Field { name: "coalesce(column1,column2)", 
data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: 
{} }], metadata: {} }
   Right: Schema { fields: [Field { name: "coalesce(column1,column2)", 
data_type: Float64, nullable: true, dict_id: 0, dict_is_ordered: false, 
metadata: {} }], metadata: {} }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to