Implement filter and union.