I'd suggest looking at PredicateBuilder.build_from_hash and making the logic the same as there. That way the behavior of column resolution is the same between #select and #where