[jira] [Commented] (FLINK-14274) RuntimeContext can be get from FunctionContext

2019-09-30 Thread Jark Wu (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-14274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16940768#comment-16940768
 ] 

Jark Wu commented on FLINK-14274:
-

I agree with [~ykt836], we can definitely add more reasonable methods in 
FunctionContext, but state methods is not one of them. 
For example, adding methods for taskName and taskIndex and configurations make 
sense to me. 

>  RuntimeContext can be get from FunctionContext
> ---
>
> Key: FLINK-14274
> URL: https://issues.apache.org/jira/browse/FLINK-14274
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Affects Versions: 1.9.0
>Reporter: hailong wang
>Priority: Major
> Fix For: 1.10.0
>
>
> Now, we can get metricGroup、cachedFile and jobParameter from functionContext 
> in UDF. If we expose runtimeContext from functionContext, user can get more 
> useful variable  such as state.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-14274) RuntimeContext can be get from FunctionContext

2019-09-29 Thread Kurt Young (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-14274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16940589#comment-16940589
 ] 

Kurt Young commented on FLINK-14274:


[~hailong wang] Once RuntimeContext exposed to user, the framework will have no 
chance to stop user from using state in UDF. If you want to use other functions 
other than state in RuntimeContext, you can open other issues to describe what 
kind of methods you want and we can add them to the FunctionContext. 

I will close this for now, we can re-open it once needed. 

>  RuntimeContext can be get from FunctionContext
> ---
>
> Key: FLINK-14274
> URL: https://issues.apache.org/jira/browse/FLINK-14274
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Affects Versions: 1.9.0
>Reporter: hailong wang
>Priority: Major
> Fix For: 1.10.0
>
>
> Now, we can get metricGroup、cachedFile and jobParameter from functionContext 
> in UDF. If we expose runtimeContext from functionContext, user can get more 
> useful variable  such as state.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-14274) RuntimeContext can be get from FunctionContext

2019-09-29 Thread hailong wang (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-14274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16940328#comment-16940328
 ] 

hailong wang commented on FLINK-14274:
--

Thank you for your reply,  I agree this is by-design. But i think it will be 
flexible if runtimeContext can be exposed.

>  RuntimeContext can be get from FunctionContext
> ---
>
> Key: FLINK-14274
> URL: https://issues.apache.org/jira/browse/FLINK-14274
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Affects Versions: 1.9.0
>Reporter: hailong wang
>Priority: Major
> Fix For: 1.10.0
>
>
> Now, we can get metricGroup、cachedFile and jobParameter from functionContext 
> in UDF. If we expose runtimeContext from functionContext, user can get more 
> useful variable  such as state.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-14274) RuntimeContext can be get from FunctionContext

2019-09-29 Thread Kurt Young (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-14274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16940312#comment-16940312
 ] 

Kurt Young commented on FLINK-14274:


I think this is by-design, we didn't allow UDF to use state.

>  RuntimeContext can be get from FunctionContext
> ---
>
> Key: FLINK-14274
> URL: https://issues.apache.org/jira/browse/FLINK-14274
> Project: Flink
>  Issue Type: Improvement
>  Components: Table SQL / API
>Affects Versions: 1.9.0
>Reporter: hailong wang
>Priority: Major
> Fix For: 1.10.0
>
>
> Now, we can get metricGroup、cachedFile and jobParameter from functionContext 
> in UDF. If we expose runtimeContext from functionContext, user can get more 
> useful variable  such as state.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)