File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 19
19
package org .apache .flink .table .functions ;
20
20
21
21
import org .apache .flink .annotation .PublicEvolving ;
22
+ import org .apache .flink .api .common .TaskInfo ;
22
23
import org .apache .flink .api .common .externalresource .ExternalResourceInfo ;
23
24
import org .apache .flink .api .common .functions .OpenContext ;
24
25
import org .apache .flink .api .common .functions .RuntimeContext ;
@@ -80,6 +81,20 @@ public FunctionContext(RuntimeContext context) {
80
81
this (context , null , null );
81
82
}
82
83
84
+ /**
85
+ * Get the {@link TaskInfo} for this parallel subtask.
86
+ *
87
+ * @return task info for this parallel subtask.
88
+ */
89
+ public TaskInfo getTaskInfo () {
90
+ if (context == null ) {
91
+ throw new TableException (
92
+ "Calls to FunctionContext.getTaskInfo are not available "
93
+ + "at the current location." );
94
+ }
95
+ return context .getTaskInfo ();
96
+ }
97
+
83
98
/**
84
99
* Returns the metric group for this parallel subtask.
85
100
*
You can’t perform that action at this time.
0 commit comments