Skip to content

Commit 3c8b2fd

Browse files
mrzzyZhu Zhanyan
authored andcommitted
Fixed bug in featurset proto to model conversion in DataflowJobManager (#578)
Bug caused by toString() method being used in the conversion lambda instead of the getName() method. Since lambda duplicates functionality already implemented by Feature.fromProto, removing the lambda block in favor using the method to do the conversion. Co-authored-by: Zhu Zhanyan <zhu.zhanyan@gojek.com>
1 parent ed8e951 commit 3c8b2fd

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

core/src/main/java/feast/core/job/dataflow/DataflowJobManager.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,7 @@ private Job submitDataflowJob(
181181
ImportOptions pipelineOptions = getPipelineOptions(jobName, featureSetProtos, sink, update);
182182
DataflowPipelineJob pipelineResult = runPipeline(pipelineOptions);
183183
List<FeatureSet> featureSets =
184-
featureSetProtos.stream()
185-
.map(
186-
fsp -> {
187-
FeatureSet featureSet = new FeatureSet();
188-
featureSet.setName(fsp.getSpec().toString());
189-
featureSet.setVersion(fsp.getSpec().getVersion());
190-
featureSet.setProject(new Project(fsp.getSpec().getProject()));
191-
return featureSet;
192-
})
193-
.collect(Collectors.toList());
184+
featureSetProtos.stream().map(FeatureSet::fromProto).collect(Collectors.toList());
194185
String jobId = waitForJobToRun(pipelineResult);
195186
return new Job(
196187
jobName,

0 commit comments

Comments
 (0)