ihji commented on code in PR #17767:
URL: https://github.com/apache/beam/pull/17767#discussion_r888450571
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/util/PythonCallableSource.java:
##########
@@ -20,7 +20,27 @@
import java.io.Serializable;
/**
- * A wrapper object storing a Python code that can be evaluated to Python
callables in Python SDK.
+ * A wrapper object storing a Python function definition that can be evaluated
to Python callables
+ * in Python SDK.
+ *
+ * <p>The snippet of Python code can be a valid Python expression (such as
{@code lambda x: x * x}
+ * or {str.upper}), a fully qualified name (such as {@code math.sin}), or a
complete, multi-line
+ * function definition (such as {@code def foo(x): ...}).
+ *
+ * <p>Any lines preceding the function definition are first evaluated to
provide context in which to
+ * define the function which can be useful to declare inports or any other
needed values, e.g.
Review Comment:
imports
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/util/PythonCallableSource.java:
##########
@@ -20,7 +20,27 @@
import java.io.Serializable;
/**
- * A wrapper object storing a Python code that can be evaluated to Python
callables in Python SDK.
+ * A wrapper object storing a Python function definition that can be evaluated
to Python callables
+ * in Python SDK.
+ *
+ * <p>The snippet of Python code can be a valid Python expression (such as
{@code lambda x: x * x}
+ * or {str.upper}), a fully qualified name (such as {@code math.sin}), or a
complete, multi-line
+ * function definition (such as {@code def foo(x): ...}).
+ *
+ * <p>Any lines preceding the function definition are first evaluated to
provide context in which to
+ * define the function which can be useful to declare inports or any other
needed values, e.g.
Review Comment:
imports
--
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]