-DATASET CSV tinysnb

--

-CASE PageRank1
-LOAD_DYNAMIC_EXTENSION algo
-STATEMENT CALL PROJECT_GRAPH('PK', ['person'], ['knows'])
---- ok
-STATEMENT CALL pr('PK') RETURN node.fName, rank;
---- 8
Alice|0.125000
Bob|0.125000
Carol|0.125000
Dan|0.125000
Elizabeth|0.018750
Farooq|0.026719
Greg|0.026719
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|0.018750

-STATEMENT CALL page_rank('PK', normalizeInitial:=false) RETURN node.fName, rank;
---- 8
Alice|1.000000
Bob|1.000000
Carol|1.000000
Dan|1.000000
Elizabeth|0.150000
Farooq|0.213750
Greg|0.213750
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|0.150000

-STATEMENT CALL PROJECT_GRAPH('PK2', ['person'], {'knows': 'r.date > date("1906-01-01")'})
---- ok
-STATEMENT CALL page_rank('PK2') RETURN node.fName, rank;
---- 8
Alice|0.125000
Bob|0.125000
Carol|0.125000
Dan|0.125000
Elizabeth|0.018750
Farooq|0.018750
Greg|0.018750
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|0.018750
-STATEMENT CALL PROJECT_GRAPH('PK3', {'person': 'n.ID > 3'}, {'knows': 'r.date > date("1906-01-01")'})
---- ok
-STATEMENT CALL page_rank('PK3') RETURN node.fName, rank;
---- 5
Dan|0.030000
Elizabeth|0.030000
Farooq|0.030000
Greg|0.030000
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|0.030000
-STATEMENT CALL page_rank('PK', dampingFactor := 0.5) RETURN node.fName, rank;
---- 8
Alice|0.125000
Bob|0.125000
Carol|0.125000
Dan|0.125000
Elizabeth|0.062500
Farooq|0.078125
Greg|0.078125
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|0.062500
-STATEMENT CALL page_rank('PK', dampingFactor := 0.3, maxIterations := 10) RETURN node.fName, rank;
---- 8
Alice|0.125000
Bob|0.125000
Carol|0.125000
Dan|0.125000
Elizabeth|0.087500
Farooq|0.100625
Greg|0.100625
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|0.087500
-STATEMENT CALL pr('PK', dampingFactor := 0.1, maxIterations := 15, tolerance := 0.00024) RETURN node.fName, rank;
---- 8
Alice|0.125000
Bob|0.125000
Carol|0.125000
Dan|0.125000
Elizabeth|0.112500
Farooq|0.118125
Greg|0.118125
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|0.112500
-STATEMENT CALL page_rank('PK', dampingFactOR := 5.2) RETURN node.fName, rank;
---- error
Binder exception: Damping factor must be in the [0, 1).
-STATEMENT CALL page_rank('PK', MAXITerations := -9) RETURN node.fName, rank;
---- error
Binder exception: Max iteration must be a positive integer.
-STATEMENT CALL page_rank('PK', maxIteratioN := 4) RETURN node.fName, rank;
---- error
Binder exception: Unknown optional parameter: maxIteratioN
-STATEMENT CALL PROJECT_GRAPH('G1'
        , {'person': 'n.ID < 10', 'organisation': ''}
        , ['knows', 'studyAt'])
---- ok
-STATEMENT CALL page_rank('G1') RETURN node.fName, node.name, rank;
---- 10
Alice||0.059642
Bob||0.059642
Carol||0.056348
Dan||0.056348
Elizabeth||0.015000
Farooq||0.021375
Greg||0.021375
|ABFsUni|0.058538
|CsWork|0.015000
|DEsWork|0.015000
