implement conditional relmap operator