Skip to content

Commit

Permalink
bug fix 4 variable task lineage
Browse files Browse the repository at this point in the history
  • Loading branch information
MactavishCui committed Dec 31, 2024
1 parent d64b61f commit b6595b6
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import org.dinky.mybatis.util.ProTableUtil;
import org.dinky.service.ClusterConfigurationService;
import org.dinky.service.ClusterInstanceService;
import org.dinky.service.FragmentVariableService;
import org.dinky.service.HistoryService;
import org.dinky.service.JobHistoryService;
import org.dinky.service.JobInstanceService;
Expand Down Expand Up @@ -85,6 +86,7 @@ public class JobInstanceServiceImpl extends SuperServiceImpl<JobInstanceMapper,
private final ClusterInstanceService clusterInstanceService;
private final ClusterConfigurationService clusterConfigurationService;
private final JobHistoryService jobHistoryService;
private final FragmentVariableService fragmentVariableService;

@Override
public JobInstance getByIdWithoutTenant(Integer id) {
Expand Down Expand Up @@ -295,7 +297,13 @@ public void refreshJobByTaskIds(Integer... taskIds) {
@Override
public LineageResult getLineage(Integer id) {
History history = getJobInfoDetail(id).getHistory();
return LineageBuilder.getColumnLineageByLogicalPlan(history.getStatement(), ExecutorConfig.DEFAULT);
ExecutorConfig config = ExecutorConfig.builder()
.checkpoint(0)
.parallelism(1)
.useSqlFragment(true)
.variables(fragmentVariableService.listEnabledVariables())
.build();
return LineageBuilder.getColumnLineageByLogicalPlan(history.getStatement(), config);
}

@Override
Expand Down

0 comments on commit b6595b6

Please sign in to comment.