(At least in the dynamic multinomial branch) the spouse example can barely finish because the grounding SQL of a binary factor is on top of a double-self-join where each base relation is a multi-way join view itself. Adding @materialize on the schema declarations doesn't seem to work, but annotating the rules would make spouse runnable again. Maybe we want to materialize by default? Or if we want to be smart, we materialize a relation when a) at least one populating rule involves a join, and b) the relation is referenced more than once in rule bodies.
(At least in the dynamic multinomial branch) the spouse example can barely finish because the grounding SQL of a binary factor is on top of a double-self-join where each base relation is a multi-way join view itself. Adding
@materialize
on the schema declarations doesn't seem to work, but annotating the rules would make spouse runnable again. Maybe we want to materialize by default? Or if we want to be smart, we materialize a relation when a) at least one populating rule involves a join, and b) the relation is referenced more than once in rule bodies.