Hi Simon,
Thank you for the guidance. I also just saw and acknowledged your response on the forum. It totally makes sense to focus on the ORM architecture instead of a specific feature like generate_series.
Making CompositeField work nicely to deal with expressions that return tuples and refactoring SQL generation from the compiler to resolve_expression is a good strategy. I can definitely see why you’d do that to lay the groundwork for SRFs to just work as a natural fit using LATERAL JOIN pushdowns.
I look forward to working further on this and learning from you.
Cheers,
William