[
https://issues.apache.org/jira/browse/FLINK-11045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16706601#comment-16706601
]
ASF GitHub Bot commented on FLINK-11045:
----------------------------------------
hequn8128 opened a new pull request #7213: [FLINK-11045][table] Set correct
UserCodeClassLoader for RuntimeUDFContext in CollectionExecutor
URL: https://github.com/apache/flink/pull/7213
## What is the purpose of the change
Currently, a system classloader is been used when creating a
`RuntimeUDFContext`. This pull request set correct `UserCodeClassLoader` for
`RuntimeUDFContext` in `CollectionExecutor`.
## Brief change log
- Set correct UserCodeClassLoader for RuntimeUDFContext in
CollectionExecutor
## Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
## Does this pull request potentially affect one of the following parts:
- Dependencies (no)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> UserCodeClassLoader has not been set correctly for RuntimeUDFContext in
> CollectionExecutor
> ------------------------------------------------------------------------------------------
>
> Key: FLINK-11045
> URL: https://issues.apache.org/jira/browse/FLINK-11045
> Project: Flink
> Issue Type: Bug
> Components: Table API & SQL
> Reporter: Hequn Cheng
> Assignee: Hequn Cheng
> Priority: Major
> Labels: pull-request-available
>
> We should use {{UserCodeClassLoader}} when new a {{RuntimeUDFContext}}.
> i.e., Change the code from
> {code:java}
> this.classLoader = getClass().getClassLoader();
> new RuntimeUDFContext(taskInfo, classLoader, executionConfig, cachedFiles,
> accumulators, metrics)
> {code}
> to
> {code:java}
> new RuntimeUDFContext(taskInfo, Thread.currentThread().getContextClassLoader,
> executionConfig, cachedFiles, accumulators, metrics)
> {code}
> in {{CollectionExecutor}}.
> FYI. This is a problem reported from the [user mailing
> list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Table-API-example-Table-program-cannot-be-compiled-This-is-a-bug-Please-file-an-issue-td24852.html].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)