[
https://issues.apache.org/jira/browse/FLINK-11974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jingsong Lee updated FLINK-11974:
---------------------------------
Description:
If we need CodeGen an entire Operator, one possible solution is to introduce an
OperatorWrapper, then generate a CodeGen sub-Operator in OperatorWrapper's
open, and then proxy all methods to the sub-Operator. But introduce
OperatorWrapper results in multiple virtual function calls.
The another way is to introduce a StreamOperatorFactory. In runtime, we get the
StreamOperatorFactory and create real operator to invoke. In this way, there is
no redundant virtual call, the test results show that the performance improves
by about 10% after the introduction of StreamOperatorFactory. (Benchmark for
simple query:
[https://github.com/JingsongLi/flink/blob/benchmarkop/flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/benchmark/batch/CalcBenchmark.java])
was:
If we need CodeGen an entire Operator, one possible solution is to introduce an
OperatorWrapper, then generate a CodeGen sub-Operator in OperatorWrapper's
open, and then proxy all methods to the sub-Operator. But introduce
OperatorWrapper results in multiple virtual function calls.
The another way is to introduce a StreamOperatorFactory. In runtime, we get the
StreamOperatorFactory and create real operator to invoke. In this way, there is
no redundant virtual call, the test results show that the performance improves
by about 10% after the introduction of StreamOperatorFactory.
> Introduce StreamOperatorFactory to help table perform the whole Operator
> CodeGen
> --------------------------------------------------------------------------------
>
> Key: FLINK-11974
> URL: https://issues.apache.org/jira/browse/FLINK-11974
> Project: Flink
> Issue Type: New Feature
> Components: Runtime / Operators
> Reporter: Jingsong Lee
> Assignee: Jingsong Lee
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> If we need CodeGen an entire Operator, one possible solution is to introduce
> an OperatorWrapper, then generate a CodeGen sub-Operator in OperatorWrapper's
> open, and then proxy all methods to the sub-Operator. But introduce
> OperatorWrapper results in multiple virtual function calls.
> The another way is to introduce a StreamOperatorFactory. In runtime, we get
> the StreamOperatorFactory and create real operator to invoke. In this way,
> there is no redundant virtual call, the test results show that the
> performance improves by about 10% after the introduction of
> StreamOperatorFactory. (Benchmark for simple query:
> [https://github.com/JingsongLi/flink/blob/benchmarkop/flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/benchmark/batch/CalcBenchmark.java])
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)