type -> stream_type to distinguish from join type