Skip to content

Initial condition of Pregel doesnt work if condition is based on a column having null as it values. #375

@ironhide0396

Description

@ironhide0396

A sample code of what I am doing is attached

    Pregel pregel = graphFrame.pregel();
    pregel.setCheckpointInterval(0);
    pregel.setMaxIter(1);
    Column initialCondition = when(col("Hieght").isNull(), lit(0)).otherwise(lit(1));
    pregel.withVertexColumn(
            "NewHieght",
            initialCondition,
            col("newDummyColumn").plus(Pregel.msg()));
    pregel.sendMsgToDst(lit(1));
    pregel.aggMsgs(last(Pregel.msg()));
    Dataset<Row> run = pregel.run();

The output of above is as follows :
1.Value of NewHieght is 2 for each row where Hieght is not null ( Working Correctly )
2.Value of NewHieght must be 1 for each row where Hieght is null ( I am getting null in NewHieght)

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions