def METHOD_NAME(table, snapshot):
    t0 = table
    t1 = t0.view()
    expr = t0.g == t1.g
    ctx = ImpalaCompiler.make_context()
    ctx.make_alias(t0.op())
    # Grab alias from parent context
    subctx = ctx.subcontext()
    subctx.make_alias(t1.op())
    subctx.make_alias(t0.op())
    result = translate(expr, context=subctx)
    snapshot.assert_match(result, "out.sql")