You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/03/10 10:36:09 UTC

Re: [PR] Remove physical expr of ListIndex and ListRange, convert to `array_element` and `array_slice` functions [arrow-datafusion]

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


##########
datafusion/physical-expr/src/expressions/get_indexed_field.rs:
##########
@@ -42,61 +40,25 @@ use std::{any::Any, sync::Arc};
 pub enum GetFieldAccessExpr {
     /// Named field, For example `struct["name"]`

Review Comment:
   🤔  maybe we should also convert this into a function call as well (as a follow on PR) to remove the entire `GetFieldAccessExpr` physical expr



##########
datafusion/optimizer/src/analyzer/rewrite_expr.rs:
##########
@@ -119,6 +121,39 @@ impl TreeNodeRewriter for OperatorToFunctionRewriter {
                 })));
             }
         }
+
+        if let Expr::GetIndexedField(GetIndexedField {

Review Comment:
   This is quite clever 👏 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org