tsungchih commented on code in PR #9045:
URL: https://github.com/apache/gravitino/pull/9045#discussion_r2512751286
##########
clients/client-python/gravitino/dto/util/dto_converters.py:
##########
@@ -302,3 +309,101 @@ def from_dtos(dtos):
if not dtos:
return []
return [DTOConverters.from_dto(dto) for dto in dtos]
+
+ @staticmethod
+ def to_function_arg(expression: Expression) -> FunctionArg:
+ """Converts an Expression to an FunctionArg DTO.
+
+ Args:
+ expression (Expression): The expression to be converted.
+
+ Returns:
+ FunctionArg: The expression DTO.
+ """
+
+ if isinstance(expression, FunctionArg):
+ return cast(FunctionArg, expression)
+ if isinstance(expression, Literal):
+ if expression is Literals.NULL:
+ return LiteralDTO.NULL
+ return (
+ LiteralDTO.builder()
+ .with_value(str(expression.value()))
Review Comment:
Hi @unknowntpo Thanks for your comments. I'm using VSCode as the IDE and I
don't see the warnings you mentioned in my IDE or anywhere.
--
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]