final TestContext context =
TestContext.instance().withSchema(schema);
// The filter condition does not require a join to the fact table.
assertQuerySql(context, query, patterns);
assertQuerySql(context.withRole("Role1"), query, patterns);
// in a non-empty context where a role is in effect, the query
// will pessimistically join the fact table and apply the
// constraint, since the filter condition could be influenced by
// role limitations.