[jira] [Created] (FLINK-13333) Potentially NPE of preview plan functionality

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-13333) Potentially NPE of preview plan functionality

Shang Yuanchun (Jira)
TisonKun created FLINK-13333:
--------------------------------

             Summary: Potentially NPE of preview plan functionality
                 Key: FLINK-13333
                 URL: https://issues.apache.org/jira/browse/FLINK-13333
             Project: Flink
          Issue Type: Bug
    Affects Versions: 1.10.0
            Reporter: TisonKun


{{PackagedProgram#getPreviewPlan}} contains code as below

{code:java}
if (isUsingProgramEntryPoint()) {
    previewPlan = Optimizer.createPreOptimizedPlan(getPlan());
} else if (isUsingInteractiveMode()) {
    // ...
    getPlan().getJobId();
    // ....
}
{code}
 
when the latter {{#getPlan}} executed, it will finally execute {{program.getPlan(options)}} where {{program}} equals null.

To solve this problem, we can replace {{getPlan}} with {{env.getPlan}}. Where {{env}} is an instance of {{PreviewPlanEnvironment}}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)