First implementation of the join operator