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


##########
datafusion/physical-expr/src/expressions/get_indexed_field.rs:
##########
@@ -82,12 +82,36 @@ pub struct GetIndexedFieldExpr {
 }
 
 impl GetIndexedFieldExpr {
-    /// Create new get field expression
+    /// Create new [`GetIndexedFieldExpr`]
     pub fn new(arg: Arc<dyn PhysicalExpr>, field: GetFieldAccessExpr) -> Self {
         Self { arg, field }
     }
 
-    /// Get the input field
+    /// Create a new [`GetIndexedFieldExpr`] for accessing the named field
+    pub fn new_field(arg: Arc<dyn PhysicalExpr>, name: impl Into<String>) -> 
Self {

Review Comment:
   I made these new functions and updated the tests to use them



##########
datafusion/physical-expr/src/expressions/get_indexed_field.rs:
##########
@@ -82,12 +82,36 @@ pub struct GetIndexedFieldExpr {
 }
 
 impl GetIndexedFieldExpr {
-    /// Create new get field expression
+    /// Create new [`GetIndexedFieldExpr`]
     pub fn new(arg: Arc<dyn PhysicalExpr>, field: GetFieldAccessExpr) -> Self {
         Self { arg, field }
     }
 
-    /// Get the input field
+    /// Create a new [`GetIndexedFieldExpr`] for accessing the named field
+    pub fn new_field(arg: Arc<dyn PhysicalExpr>, name: impl Into<String>) -> 
Self {

Review Comment:
   I made these new functions and updated the tests to use them to avoid 
repetitio



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