andygrove commented on code in PR #3336:
URL: https://github.com/apache/arrow-datafusion/pull/3336#discussion_r961160181


##########
datafusion/expr/src/expr.rs:
##########
@@ -962,18 +942,31 @@ fn create_name(e: &Expr, input_schema: &DFSchema) -> 
Result<String> {
 }
 
 /// Create a comma separated list of names from a list of expressions
-fn create_names(exprs: &[Expr], input_schema: &DFSchema) -> Result<String> {
+fn create_names(exprs: &[Expr]) -> Result<String> {
     Ok(exprs
         .iter()
-        .map(|e| create_name(e, input_schema))
+        .map(|e| create_name(e))
         .collect::<Result<Vec<String>>>()?
         .join(", "))
 }
 
 #[cfg(test)]
 mod test {
     use crate::expr_fn::col;
-    use crate::lit;
+    use crate::{case, lit};
+    use datafusion_common::{Result, ScalarValue};
+
+    #[test]
+    fn format_case_when() -> Result<()> {

Review Comment:
   I added this test just to demonstrate the difference between `Expr` 
`Display`, `Debug`, and `name()`. I plan on adding more tests in future PRs to 
cover other expressions.



-- 
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]

Reply via email to