Timm0 commented on code in PR #30095:
URL: https://github.com/apache/flink/pull/30095#discussion_r4683065206


##########
flink-python/pyflink/table/expression.py:
##########
@@ -275,6 +275,15 @@ def _get_java_expression(expr, to_expr: bool = False):
         return expr
 
 
+def _to_java_varargs(args):
+    """
+    Packs the given arguments into a Java Object[], as py4j does not do this 
for a Java varargs
+    parameter.
+    """
+    gateway = get_gateway()
+    return to_jarray(gateway.jvm.Object, [_get_java_expression(arg) for arg in 
args])

Review Comment:
   This drops the per-element `ApiExpressionUtils.objectToExpression` that 
`in_`, `printf` and `elt` used to do. So `col('a').in_([1, 2])` now raises an 
`AttributeError`.
   Could we also add an assertion for `in(a, array(1, 2))` and `printf` and 
`elt` so this stays covered?



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

Reply via email to