alamb commented on code in PR #4546:
URL: https://github.com/apache/arrow-datafusion/pull/4546#discussion_r1046044588


##########
datafusion/common/src/column.rs:
##########
@@ -70,7 +71,7 @@ impl Column {
         // name
         Column {
             relation: None,
-            name: String::from(flat_name),
+            name: flat_name,

Review Comment:
   This would always clone previously, and now it allows the caller to pass in 
a `String` if they have one and avoid the `clone`



##########
datafusion/expr/src/expr_fn.rs:
##########
@@ -25,11 +25,17 @@ use crate::{
     ScalarFunctionImplementation, ScalarUDF, Signature, StateTypeFunction, 
Volatility,
 };
 use arrow::datatypes::DataType;
-use datafusion_common::Result;
+use datafusion_common::{Column, Result};
 use std::sync::Arc;
 
 /// Create a column expression based on a qualified or unqualified column name
-pub fn col(ident: &str) -> Expr {
+///
+/// example:

Review Comment:
   This is demonstrating you can still call `col` with a `&str` but now also 
with a `String` or `&String` to allow backwards compatibility as well as reuse



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