I have stored the following records
Bin day = new Bin("day", Value.get("Monday"));
Bin month = new Bin("month", Value.get(11));
Bin active = new Bin("active", Value.get(false));
client.put( wPolicy, keyA, day, month, active );
aql> select * from insurance
+-------------+-------+--------+
| day | month | active |
+-------------+-------+--------+
| "Monday" | 11 | 0 |
| "Wednesday" | 9 | 0 |
| "Tuesday" | 10 | 1 |
+-------------+-------+--------+
3 rows in set (0.265 secs)
When selecting this data with an expression it returns null if using:
Exp.eq(Exp.boolBin("active"), Exp.val(false)
but if I use
Exp.eq(Exp.intBin("active"), Exp.val(0)
it works?
Would have expected both to work.
Here is the NOT working version:
Policy policy = new Policy();
policy.filterExp = Exp.build(
Exp.and(
Exp.eq(Exp.stringBin("day"), Exp.val("Monday")),
Exp.eq(Exp.intBin("month"), Exp.val(11)),
Exp.eq(Exp.boolBin("active"), Exp.val(false))
)
);
Return null
Here is the working version:
Policy policy = new Policy();
policy.filterExp = Exp.build(
Exp.and(
Exp.eq(Exp.stringBin("day"), Exp.val("Monday")),
Exp.eq(Exp.intBin("month"), Exp.val(11)),
Exp.eq(Exp.intBin("active"), Exp.val(0))
)
);
return (gen:1),(exp:364822605),(bins:(day:Monday),(month:11),(active:0))