Add pipelined function for select