autophagy commented on code in PR #28212:
URL: https://github.com/apache/flink/pull/28212#discussion_r3287714990
##########
flink-table/flink-table-test-utils/src/main/java/org/apache/flink/table/runtime/functions/ProcessTableFunctionTestHarness.java:
##########
@@ -1252,31 +1399,75 @@ private void handleEvalInvocationException(
}
/**
- * Metadata for a single argument extracted from type inference.
+ * Base class for PTF eval() arguments.
*
* <p>Represents validated argument information combining PTF signature,
type inference results,
* and builder configuration.
*/
- private static class ArgumentInfo {
+ private abstract static class ArgumentInfo {
final String name;
final DataType dataType;
+
+ ArgumentInfo(String name, DataType dataType) {
+ this.name = name;
+ this.dataType = dataType;
+ }
+
+ static List<StateArgumentInfo> filterStateArguments(List<ArgumentInfo>
arguments) {
+ List<StateArgumentInfo> result = new ArrayList<>();
+ for (ArgumentInfo arg : arguments) {
+ if (arg instanceof StateArgumentInfo) {
+ result.add((StateArgumentInfo) arg);
+ }
+ }
+ return result;
+ }
+
+ static List<TableArgumentInfo> filterTableArguments(List<ArgumentInfo>
arguments) {
+ List<TableArgumentInfo> result = new ArrayList<>();
+ for (ArgumentInfo arg : arguments) {
+ if (arg instanceof TableArgumentInfo) {
+ result.add((TableArgumentInfo) arg);
+ }
+ }
+ return result;
+ }
+
+ static List<ScalarArgumentInfo>
filterScalarArguments(List<ArgumentInfo> arguments) {
+ List<ScalarArgumentInfo> result = new ArrayList<>();
+ for (ArgumentInfo arg : arguments) {
+ if (arg instanceof ScalarArgumentInfo) {
+ result.add((ScalarArgumentInfo) arg);
+ }
+ }
+ return result;
+ }
+ }
+
+ /** State parameter with TTL configuration. */
+ static class StateArgumentInfo extends ArgumentInfo {
+ final Duration ttl;
Review Comment:
I'll keep it for now, just to have it for the ttl stuff later.
--
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]