raoraoxiong commented on code in PR #28998:
URL: https://github.com/apache/flink/pull/28998#discussion_r3920901252
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/python/PythonFunctionInfo.java:
##########
@@ -36,11 +36,65 @@ public class PythonFunctionInfo implements Serializable {
private final PythonFunction pythonFunction;
/**
- * The input arguments, it could be an input offset of the input row or
the execution result of
- * another python function described as PythonFunctionInfo.
+ * The input arguments. It could be one of the following:
+ *
+ * <ul>
+ * <li>{@link Integer} – an input offset of the input row
Review Comment:
**Introduced `PythonFunctionInput`** — done as you suggested, with
`InputRef`,
`ConstantInput`, `ResultRef` and `PythonFunctionInfo` implementing it.
`ResultRef`
moved out of `PythonFunctionInfo` so it sits alongside the other argument
types
rather than being nested in one of them. This turned out to be worth more
than
readability: the previous trailing `else` assumed "whatever is left is a
`byte[]`"
and cast it directly, so a fifth kind of argument would have silently fallen
into
the constant branch. The dispatch sites now match on the concrete types and
reject
an unknown one explicitly.
--
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]