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

godfrey he commented on FLINK-20509:
------------------------------------

after an offline discussion with [~jark], we reach the following agreement:
1. keep {{verifyPlan}} method, which will print {{planBefore}}, {{planMiddle}} 
and {{planAfter}}. {{planBefore}} is original (un-optimized) logical plan, 
corresponding to {{Abstract Syntax Tree}} item in the explain result; 
{{planMiddle}} is the optimized physical plan, corresponding to {{Optimized 
Physical Plan}}  item in the explain result. and {{ESTIMATED_COST}} and 
{{CHANGELOG_MODE}} could be applied on physical plan; {{planAfter}} is the 
optimized execution plan, corresponding to {{Optimized Execution Plan}}  item 
in the explain result. see https://issues.apache.org/jira/browse/FLINK-20478 
for more details about explain refactor
2. add {{verifyRelPlan}} method, which will print {{planBefore}} and 
{{planAfter}}. {{planBefore}} is original (un-optimized) logical plan, 
{{planAfter}} is the optimized physical plan. We could use this method to check 
the rule tests and the tests that only care about the calcite optimized result, 
such as {{ESTIMATED_COST}} and {{CHANGELOG_MODE}} 
3. add {{verifyExecPlan}} method, which will print {{planBefore}} and 
{{planAfter}}. {{planBefore}} is original (un-optimized) logical plan, 
{{planAfter}} is the optimized execution plan. currently, most test case will 
use this method to verify the plan, such as {{JoinTest}}, {{CalcTest}}, etc.

> Refactor verifyPlan method in TableTestBase
> -------------------------------------------
>
>                 Key: FLINK-20509
>                 URL: https://issues.apache.org/jira/browse/FLINK-20509
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Planner
>            Reporter: godfrey he
>            Priority: Major
>
>  Currently, we use {{verifyPlan}} method to verify the plan result for both 
> {{RelNode}} plan and {{ExecNode}} plan, because their instances are the same. 
> But once the implementation of {{RelNode}} and {{ExecNode}} are separated, we 
> can't get {{ESTIMATED_COST}} and {{CHANGELOG_MODE}} on {{ExecNode}} plan. So 
> in order to make those methods more clear, the {{verifyPlan}} method will be 
> separated into two methods, {{verifyRelPlan}} for verifying the {{RelNode}} 
> plan, and {{verifyExecPlan}} for verifying the {{ExecNode}} plan. 



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

Reply via email to