zjffdu commented on a change in pull request #9389:
[FLINK-13645][table-planner] Error in code-gen when using blink planner in
scala shell
URL: https://github.com/apache/flink/pull/9389#discussion_r311943578
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/CodeGeneratorContext.scala
##########
@@ -603,7 +603,7 @@ class CodeGeneratorContext(val tableConfig: TableConfig) {
val byteArray = InstantiationUtil.serializeObject(obj)
val objCopy: AnyRef = InstantiationUtil.deserializeObject(
byteArray,
- obj.getClass.getClassLoader)
+ Thread.currentThread().getContextClassLoader)
references += objCopy
Review comment:
The proper place to put the test code is module `flink-scala-shell`. But
after some investigation, I just found that it is not easy to do that because
currently scala shell doesn't' support switch planner. I may need to create
another PR to support that, but that seems too complicated.
Since this is a straightforward fix, I think it is OK without test code.
What do you think @danny0405
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services