q1 = session.query(Baz.foo, Quux.bar).join(Quux.bar)
q2 = session.query(Baz.foo, sqlalchemy.null().label('null_bar'))
qall = q1.union(q2)
foocol = qall.column_descriptions[0]['expr']
qgrp = qall.group_by([col['name'] for col in qall.column_descriptions])
q = qgrp.having(foocol == 'John Doe')
q.all()
Selecting Null in SQLAlchemy