Realized that I don't need types if the compiler can infer them. That makes this much simpler.
Moved query expression transformer to the macro expansion phase of the pipeline and removed all unnecessary type-related code.
SELECT, WHERE, ORDERBY and CAST transformations are working correctly now.  Still poking at transparent identifiers.