nuno-faria commented on code in PR #1605:
URL:
https://github.com/apache/datafusion-python/pull/1605#discussion_r3444271107
##########
python/datafusion/functions/__init__.py:
##########
@@ -73,6 +73,13 @@ def _warn_expr_for_literal_arg(function_name: str, arg_name:
str) -> None:
)
+def _warn_if_expr_for_literal_arg(
+ value: Any, function_name: str, arg_name: str
+) -> None:
+ if isinstance(value, Expr):
+ _warn_expr_for_literal_arg(function_name, arg_name)
+
+
Review Comment:
Wouldn't it be better to combine these two into a single function?
##########
python/tests/test_functions.py:
##########
Review Comment:
The calls to `encode` and `decode` need to be updated to not raise warnings.
##########
python/tests/test_functions.py:
##########
Review Comment:
The calls here also need to be updated.
--
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]