jayzhan211 commented on code in PR #12259:
URL: https://github.com/apache/datafusion/pull/12259#discussion_r1739645059


##########
datafusion/functions-nested/src/planner.rs:
##########
@@ -148,6 +148,13 @@ impl ExprPlanner for FieldAccessPlanner {
             // expr[idx] ==> array_element(expr, idx)
             GetFieldAccess::ListIndex { key: index } => {
                 match expr {
+                    // Special case for accessing map value with non-string 
values
+                    Expr::ScalarFunction(scalar_func) if is_map(&scalar_func) 
=> {
+                        Ok(PlannerResult::Planned(get_field_from_expr(
+                            Expr::ScalarFunction(scalar_func),
+                            *index,

Review Comment:
   I think index is always literal, therefore we don't really need 
`get_field_from_expr`



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