tsungchih commented on code in PR #8841:
URL: https://github.com/apache/gravitino/pull/8841#discussion_r2445167915
##########
clients/client-python/gravitino/api/rel/expressions/transforms/transforms.py:
##########
@@ -241,21 +241,31 @@ def apply(name: str, arguments: List[Expression]) ->
"Transforms.ApplyTransform"
return Transforms.ApplyTransform(name=name, arguments=arguments)
+ @overload
+ @staticmethod
+ def list(*field_names: List[str]) -> "Transforms.ListTransform": ...
+
+ @overload
@staticmethod
def list(
- *field_names: List[str], assignments: Optional[List[ListPartition]] =
None
- ) -> "Transforms.ListTransform":
- """Create a transform that includes multiple fields in a list.
+ *, field_names: List[List[str]], assignments: List[ListPartition]
Review Comment:
Hi @jerryshao , the `*` here means that all of the arguments shown after `*`
should be passed as keyword arguments instead of positional arguments. In doing
so, we could construct `list` method to support multiple different combinations
of argument types. Namely, `list(["country"], ["city"])` and
`list(field_names=[["score"]], assignments=[...])`.
--
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]