victor-axelsson / id2210

0 stars 0 forks source link

Fix for first you need to select Doc #9

Closed RubbyRedson closed 7 years ago

RubbyRedson commented 7 years ago

Tests in ExpressionEvaluationTest failed with message "you need to select the doc first". That happened because Evaluator had null in the node field. This can be fixed by adding evalExpr(Doc()) before executing any other evalExpr. Example: Before: eval.evalExpr(expr1).evalExpr(expr2).evalExpr(expr3) produces the exeption After: eval.evalExpr(Doc()).evalExpr(expr1).evalExpr(expr2).evalExpr(expr3) works without issues

victor-axelsson commented 7 years ago

Some notes

Instead of using: evalExpr(Doc()) you can also use the nicer syntax: evalExpr Doc() which corresponds better to the paper. If you look at the paper you can also see how this query language should look. Example from fig8:

skarmavbild 2017-05-19 kl 10 46 43

So, as you can see the doc is selected (in this case by creating it) and then we can operate on the EXPR.

skarmavbild 2017-05-19 kl 10 48 21

Note how doc in an EXPR