Follow-up from "RUN-AS-IF-FOSS: SQL set operators INTERSECT and EXCEPT"
The following discussion from !39786 (merged) should be addressed:
-
@ashmckenzie started a discussion: (+1 comment)
With this MR I've taken the original
from_union
definition and just generalized for theintersect
andexcept
case. The originalfrom_union
code never had an array check.If we want to modify the signature I prefer the splat form:
def from_union(*members) members = members.flatten end
If we want to pursue one of these options I suggest we create a follow on issue.
question: I think we need to make sure
members
is an Array?pry(main)> Project.from_intersect([Project.limit(1)]) => [#<Project id:60 not-sync-public/private1>>] pry(main)> Project.from_intersect(Project.first) NoMethodError: undefined method `map' for #<Project id:27 not-sync/test1>>