timsaucer commented on issue #810:
URL: 
https://github.com/apache/datafusion-python/issues/810#issuecomment-2294836840

   This seems to do the trick. Leaving here for myself as a note to commit it 
after I finish the current task I have
   
   ```
       def __getitem__(self, key: str | int) -> Expr:
           """For struct data types, return the field indicated by ``key``."""
           if isinstance(key, int):
               return Expr(functions_internal.array_element(self.expr, 
Expr.literal(key).expr))
           return Expr(self.expr.__getitem__(key))
   ```


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