Copilot commented on code in PR #1554:
URL:
https://github.com/apache/datafusion-python/pull/1554#discussion_r3289175472
##########
python/datafusion/functions.py:
##########
@@ -2727,14 +2727,24 @@ def arrow_metadata(expr: Expr, key: Expr | str | None =
None) -> Expr:
return Expr(f.arrow_metadata(expr.expr, key.expr))
-def get_field(expr: Expr, name: Expr | str) -> Expr:
- """Extracts a field from a struct or map by name.
+def get_field(expr: Expr, *names: Expr | str) -> Expr:
Review Comment:
`get_field` used to accept the field name via the `name=` keyword argument,
but switching to a variadic `*names` parameter removes that keyword and will
break callers doing `get_field(expr, name="x")`. Since this is a public
function, consider preserving backward compatibility by adding an explicit
`name` parameter (positional-or-keyword or keyword-only) and then combining it
with any additional path segments before calling the internal binding.
--
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]